Skip to content

Commit

Permalink
Update to latest rapidpro v10
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jan 7, 2025
1 parent f2f33ae commit 205eb15
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 50 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2024, TextIt
Copyright (c) 2025, TextIt
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://github.com/nyaruka/rapidpro-docker/workflows/CI/badge.svg)](https://github.com/nyaruka/rapidpro-docker/actions?query=workflow%3ACI)

Docker compose for the latest stable release of RapidPro from Nyaruka (9.2.x).
Docker compose for the latest stable release of RapidPro from Nyaruka (10.0.x).

Includes:
- RapidPro webapp and celery worker ([License](https://github.com/nyaruka/rapidpro/blob/main/LICENSE))
Expand All @@ -13,6 +13,7 @@ Includes:
- PostgreSQL (postgis)
- Elasticsearch
- Redis
- DynamoDB local
- Minio (S3 emulator)

These example containers are for development purposes only and are not suitable for production deployments.
Expand Down
115 changes: 69 additions & 46 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=tembatemba
POSTGRES_PASSWORD: tembatemba
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
Expand All @@ -28,10 +28,10 @@ services:
ports:
- 9200:9200
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ingest.geoip.downloader.enabled=false
- logger.level=INFO
discovery.type: single-node
xpack.security.enabled: false
ingest.geoip.downloader.enabled: false
logger.level: INFO
healthcheck:
test: curl -s http://localhost:9200 >/dev/null || exit 1
interval: 10s
Expand All @@ -49,6 +49,19 @@ services:
interval: 5s
timeout: 2s

dynamo:
image: amazon/dynamodb-local
command: "-jar DynamoDBLocal.jar -sharedDb -port 6000"
volumes:
- dynamo:/home/dynamodblocal/data
ports:
- 6000:6000
healthcheck:
test: [ "CMD-SHELL", "curl -v http://dynamo:6000" ]
interval: 10s
timeout: 5s
restart: always

minio:
image: bitnami/minio:latest
ports:
Expand All @@ -57,9 +70,9 @@ services:
volumes:
- minio:/data
environment:
- MINIO_ROOT_USER=root
- MINIO_ROOT_PASSWORD=tembatemba
- MINIO_DEFAULT_BUCKETS=temba-attachments,temba-sessions,temba-logs,temba-archives
MINIO_ROOT_USER: root
MINIO_ROOT_PASSWORD: tembatemba
MINIO_DEFAULT_BUCKETS: temba-default,temba-attachments:public,temba-sessions,temba-logs,temba-archives
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]

Expand All @@ -68,7 +81,7 @@ services:
build:
context: ./rapidpro/
args:
- RAPIDPRO_TAG=v9.2.5
- RAPIDPRO_TAG=v10.0.1
command: ["webapp"]
depends_on:
postgres:
Expand All @@ -77,12 +90,15 @@ services:
condition: service_healthy
redis:
condition: service_healthy
dynamo:
condition: service_healthy
minio:
condition: service_healthy
ports:
- 8000:8000
environment:
- MAILROOM_URL=http://mailroom:8090
MAILROOM_URL: http://mailroom:8090
MAILROOM_AUTH_TOKEN: topsecret
healthcheck:
test: curl -s http://localhost:8000 >/dev/null || exit 1
interval: 15s
Expand All @@ -95,78 +111,83 @@ services:
build:
context: ./rapidpro/
args:
- RAPIDPRO_TAG=v9.2.5
- RAPIDPRO_TAG=v10.0.0
command: ["celery"]
depends_on:
rapidpro:
condition: service_healthy
environment:
- MAILROOM_URL=http://mailroom:8090
MAILROOM_URL: http://mailroom:8090

mailroom:
image: nyaruka/mailroom:stable
build:
context: https://github.com/nyaruka/mailroom.git#v9.2.2
context: https://github.com/nyaruka/mailroom.git#v10.0.0
dockerfile: Dockerfile
depends_on:
rapidpro:
condition: service_healthy
ports:
- 8090:8090
environment:
- MAILROOM_ADDRESS=0.0.0.0
- MAILROOM_DB=postgres://temba:temba@postgres:5432/temba?sslmode=disable
- MAILROOM_REDIS=redis://redis:6379/15
- MAILROOM_ELASTIC=http://elastic:9200
- MAILROOM_DOMAIN=${MAILROOM_DOMAIN:-host.docker.internal}
- MAILROOM_ATTACHMENT_DOMAIN=${MAILROOM_ATTACHMENT_DOMAIN:-host.docker.internal}
- MAILROOM_DISALLOWED_NETWORKS=6.6.6.6
- MAILROOM_AWS_ACCESS_KEY_ID=root
- MAILROOM_AWS_SECRET_ACCESS_KEY=tembatemba
- MAILROOM_S3_ENDPOINT=http://minio:9000
- MAILROOM_S3_SESSIONS_BUCKET=temba-sessions
- MAILROOM_S3_ATTACHMENTS_BUCKET=temba-attachments
- MAILROOM_S3_LOGS_BUCKET=temba-logs
- MAILROOM_S3_FORCE_PATH_STYLE=true
- MAILROOM_LOG_LEVEL=info
MAILROOM_ADDRESS: 0.0.0.0
MAILROOM_DB: postgres://temba:temba@postgres:5432/temba?sslmode=disable
MAILROOM_REDIS: redis://redis:6379/15
MAILROOM_ELASTIC: http://elastic:9200
MAILROOM_DOMAIN: ${MAILROOM_DOMAIN:-host.docker.internal}
MAILROOM_ATTACHMENT_DOMAIN: ${MAILROOM_ATTACHMENT_DOMAIN:-host.docker.internal}
MAILROOM_DISALLOWED_NETWORKS: 6.6.6.6
MAILROOM_AUTH_TOKEN: topsecret
MAILROOM_COURIER_AUTH_TOKEN: topsecret
MAILROOM_AWS_ACCESS_KEY_ID: root
MAILROOM_AWS_SECRET_ACCESS_KEY: tembatemba
MAILROOM_DYNAMO_ENDPOINT: http://dynamo:6000
MAILROOM_DYNAMO_TABLE_PREFIX: Temba
MAILROOM_S3_ENDPOINT: http://minio:9000
MAILROOM_S3_SESSIONS_BUCKET: temba-sessions
MAILROOM_S3_ATTACHMENTS_BUCKET: temba-attachments
MAILROOM_S3_MINIO: true
MAILROOM_LOG_LEVEL: info

courier:
image: nyaruka/courier:stable
build:
context: https://github.com/nyaruka/courier.git#v9.2.1
context: https://github.com/nyaruka/courier.git#v10.0.0
dockerfile: Dockerfile
depends_on:
rapidpro:
condition: service_healthy
ports:
- 8080:8080
environment:
- COURIER_ADDRESS=0.0.0.0
- COURIER_DB=postgres://temba:temba@postgres:5432/temba?sslmode=disable
- COURIER_REDIS=redis://redis:6379/15
- COURIER_DOMAIN=${COURIER_DOMAIN:-host.docker.internal}
- COURIER_BASE_URL=${COURIER_BASE_URL:-https://host.docker.internal}
- COURIER_DISALLOWED_NETWORKS=6.6.6.6
- COURIER_AWS_ACCESS_KEY_ID=root
- COURIER_AWS_SECRET_ACCESS_KEY=tembatemba
- COURIER_S3_ENDPOINT=http://minio:9000
- COURIER_S3_ATTACHMENTS_BUCKET=temba-attachments
- COURIER_S3_LOGS_BUCKET=temba-logs
- COURIER_S3_FORCE_PATH_STYLE=true
- COURIER_LOG_LEVEL=info
COURIER_ADDRESS: 0.0.0.0
COURIER_DB: postgres://temba:temba@postgres:5432/temba?sslmode=disable
COURIER_REDIS: redis://redis:6379/15
COURIER_DOMAIN: ${COURIER_DOMAIN:-host.docker.internal}
COURIER_BASE_URL: ${COURIER_BASE_URL:-https://host.docker.internal}
COURIER_DISALLOWED_NETWORKS: 6.6.6.6
COURIER_AUTH_TOKEN: topsecret
COURIER_AWS_ACCESS_KEY_ID: root
COURIER_AWS_SECRET_ACCESS_KEY: tembatemba
COURIER_DYNAMO_ENDPOINT: http://dynamo:6000
COURIER_DYNAMO_TABLE_PREFIX: Temba
COURIER_S3_ENDPOINT: http://minio:9000
COURIER_S3_ATTACHMENTS_BUCKET: temba-attachments
COURIER_S3_MINIO: true
COURIER_LOG_LEVEL: info

indexer:
image: nyaruka/indexer:stable
build:
context: https://github.com/nyaruka/rp-indexer.git#v9.2.0
context: https://github.com/nyaruka/rp-indexer.git#v10.0.0
dockerfile: Dockerfile
depends_on:
rapidpro:
condition: service_healthy
environment:
- INDEXER_DB=postgres://temba:temba@postgres:5432/temba?sslmode=disable
- INDEXER_ELASTIC_URL=http://elastic:9200
- INDEXER_LOG_LEVEL=info
INDEXER_DB: postgres://temba:temba@postgres:5432/temba?sslmode=disable
INDEXER_ELASTIC_URL: http://elastic:9200
INDEXER_LOG_LEVEL: info

volumes:
postgres:
Expand All @@ -175,5 +196,7 @@ volumes:
driver: local
redis:
driver: local
dynamo:
driver: local
minio:
driver: local
4 changes: 2 additions & 2 deletions rapidpro/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-bullseye
FROM python:3.12-bullseye

ARG RAPIDPRO_TAG
ENV RAPIDPRO_TAG=${RAPIDPRO_TAG:-main}
Expand All @@ -12,7 +12,7 @@ RUN npm install -g yarn less

WORKDIR /rapidpro
RUN wget -O rapidpro.tar.gz "https://github.com/nyaruka/rapidpro/archive/${RAPIDPRO_TAG}.tar.gz" && tar -xf rapidpro.tar.gz --strip-components=1 && rm rapidpro.tar.gz
RUN poetry install
RUN poetry install --no-root
RUN yarn install
RUN ln -s /rapidpro/temba/settings.py.dev /rapidpro/temba/settings.py

Expand Down
1 change: 1 addition & 0 deletions rapidpro/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ACTION=${1:-webapp}
if [ "$ACTION" = "webapp" ]; then
echo "Running RapidPro webapp..."
poetry run python3 manage.py migrate
poetry run python3 manage.py migrate_dynamo
poetry run python3 manage.py runserver 0.0.0.0:8000
elif [ "$ACTION" = "celery" ]; then
echo "Running RapidPro celery worker..."
Expand Down

0 comments on commit 205eb15

Please sign in to comment.