Make development or deployment easier with docker. Now support only PODD backend related services. For front-end development will coming soon.
Available services:
- api
- celery worker
- celery beat
- elasticsearch
- neo4j
- postgis
- redis
- cep
TO-DO:
- Add podd-quiz.
- Add podd-registration.
- Add podd-rabies-connect.
git lfs, docker, docker-compose >= 1.8
Set environment variables: 0. 3G RAM is recommended.
- Create named volumes by run
docker volume create --name podd_data. PODD_API_DIRpoint to current working Django directory.PODD_DJANGO_SECRET_KEYPODD_RAVEN_DSN, optional, if you really want to connect with sentry. Go to docker-host:9000 first to get the DSN.- Recommend autoenv to make your life easier with environment variables.
- Specify
$PODD_API_DIRto podd-api directory. Ex.export PODD_API_DIR=/path/to/podd-api/podd docker-compose up -d- By default, the service port is not exposed. You can use
docker-compose.override.yml, see config overriding for further instruction : https://docs.docker.com/compose/extends/. - If you want to run sentry.
- Go into
sentry/folder. - Run
docker-compose up -d - Run
docker-compose exec sentry sentry upgradeand create your admin user. - Go to http://docker_host:9200. Get the DSN.
You have 2 options. First, Load current data to postgresql.
psql -U postgres -W -h docker-host -p 5432 < podd-api-data.sqldocker-compose exec api python manage.py rebuild_index -v3docker-compose exec api python manage.py rebuild_graph
Or init the bare backend.
docker-compose run api python manage.py migrate
- Add uwsgi service for production
- Include nodejs-related services.
- Add nginx for easy proxy setup.