Django base image. Process managed by circus. Config with envtpl. Based on apsl/circusbase.
3.0K
Docker base image for python (currently 2.7) django projects. Multi-process container, managed by circusd. Django config managed with env vars.
Other configuration managed with envtpl (nginx, circusd).
Docker image intended for use as a base image for django apps
circus.d/django.ini.tpl) https://github.com/APSL/docker-django/blob/master/circus.d/django.ini.tpl-e RUN_CELERY=True (see circus.d/celery_worker.ini.tpl) https://github.com/APSL/docker-django/blob/master/circus.d/celery_worker.ini.tpl-e RUN_FLOWER=True (see circus.d/flower.ini.tpl) https://github.com/APSL/docker-django/blob/master/circus.d/flower.ini.tpl-e CIRCUS_HTTP=True (see https://registry.hub.docker.com/u/apsl/circusbase/)Run web worker (default True)::
-e RUN_WEB=True
Run celery worker (default False)::
-e RUN_CELERY=false
Celery worker concurrency. If not defined, uses num of cpus.
-e CELERY_WORKER_CONCURRENCY=4
Celery beat
-e RUN_CELERYBEAT=False
Celery beat scheduler type: file or class (default file)::
-e CELERYBEAT_SCHEDULE_TYPE=file
Celery beat scheduler file. (default /code/src/celerybeat-schedule)::
-e CELERYBEAT_SCHEDULE_FILE=/code/src/celerybeat-schedule
Celery beat scheduler class. (default djcelery.schedulers.DatabaseScheduler)::
-e CELERYBEAT_SCHEDULE_CLASS=djcelery.schedulers.DatabaseScheduler
Celery Flower.
-e RUN_FLOWER=False
Flower basic auth. If not defined, no auth
-e FLOWER_BASIC_AUTH=myuser:mypasswd
Flower Oauth. If defined:
-e FLOWER_AUTH=.*@apsl.net
... And all your django standar settings.
FROM apsl/django
# requirements
ADD requirements.txt /tmp/requirements.txt
RUN su -c "pew-in env pip install -r /tmp/requirements.txt" django
# add code
ADD src /code/src
RUN chown django.django /code/src -R
# collectstatic
RUN su -c "pew-in env python manage.py collectstatic --noinput" django
Content type
Image
Digest
sha256:ed4b50ba1…
Size
267.4 MB
Last updated
almost 11 years ago
docker pull apsl/django