Skip to content

Starting the server

mvilchis edited this page Jun 19, 2017 · 9 revisions

How to start:

Start postgres

cd docker_postgres 
docker build -t postgres-rp .
docker run --name postgres-rp -e TEMBAPASSWD=supersecret -d postgres-rp

Start redis

docker run --name redis-rp -p 6379:6379 -d redis

Start rapidpro

cd ..
docker build -t rapidpro .
docker run --link postgres-rp:postgres --link redis-rp:redis \
    -e SEND_MAIL=True \
    -e DEBUG=False \
    -e EMAIL_HOST_USER=rapidpro@email.com \
    -e EMAIL_HOST_PASSWORD=supersecret \
    -e DEFAULT_LANGUAGE=es \
    -e SEND_WEBHOOKS=True  \
    -e SECRET_KEY=supersecret \
    -e CONTAINER_INIT=start_rapidpro.sh \
    -e SEND_MESSAGES=True -p 8000:8000 -d rapidpro

Start celery_beat

docker run  --name rp_celery_beat --link postgres-rp:postgres --link redis-rp:redis \
    -e SEND_MAIL=True \
    -e DEBUG=False \
    -e EMAIL_HOST_USER=rapidpro@email.com \
    -e EMAIL_HOST_PASSWORD=supersecret \
    -e DEFAULT_LANGUAGE=es \
    -e SEND_WEBHOOKS=True  \
    -e SECRET_KEY=supersecret \
    -e CONTAINER_INIT=start_celery.sh \
    -e CELERY_BEAT=True \
    -e CELERY_WORKERS=8\
    -e SEND_MESSAGES=True -p 5555:5555 -d rapidpro

Start celery_handler

docker run  --name rp_celery_handler --link postgres-rp:postgres --link redis-rp:redis \
    -e SEND_MAIL=True \
    -e DEBUG=False \
    -e EMAIL_HOST_USER=rapidpro@email.com \
    -e EMAIL_HOST_PASSWORD=supersecret \
    -e DEFAULT_LANGUAGE=es \
    -e SEND_WEBHOOKS=True  \
    -e SECRET_KEY=supersecret \
    -e CONTAINER_INIT=start_celery.sh \
    -e CELERY_QUEUE=handler \
    -e CELERY_WORKERS=8\
    -e SEND_MESSAGES=True -d rapidpro

Start celery_flow

docker run  --name rp_celery_flow --link postgres-rp:postgres --link redis-rp:redis \
    -e SEND_MAIL=True \
    -e DEBUG=False \
    -e EMAIL_HOST_USER=rapidpro@email.com \
    -e EMAIL_HOST_PASSWORD=supersecret \
    -e DEFAULT_LANGUAGE=es \
    -e SEND_WEBHOOKS=True  \
    -e SECRET_KEY=supersecret \
    -e CONTAINER_INIT=start_celery.sh \
    -e CELERY_QUEUE=flows \
    -e CELERY_WORKERS=6\
    -e SEND_MESSAGES=True -d rapidpro

Start celery_msgs

docker run  --name rp_celery_msgs --link postgres-rp:postgres --link redis-rp:redis \
    -e SEND_MAIL=True \
    -e DEBUG=False \
    -e EMAIL_HOST_USER=rapidpro@email.com \
    -e EMAIL_HOST_PASSWORD=supersecret \
    -e DEFAULT_LANGUAGE=es \
    -e SEND_WEBHOOKS=True  \
    -e SECRET_KEY=supersecret \
    -e CONTAINER_INIT=start_celery.sh \
    -e CELERY_QUEUE=msgs \
    -e CELERY_WORKERS=12\
    -e SEND_MESSAGES=True -d rapidpro

In your browser:

  • if using docker-machine: http://192.168.99.100:8000/
  • if using docker directly: http://localhost:8000/
Clone this wiki locally