mirror of https://github.com/snachodog/mybuddy.git
Make docker-compose examples unicorn-appropriate
See https://pythonspeed.com/articles/gunicorn-in-docker/ Fixes https://github.com/babybuddy/babybuddy/issues/227
This commit is contained in:
parent
1689bc8e20
commit
1e36cb2211
|
@ -15,7 +15,12 @@ services:
|
|||
volumes:
|
||||
- data:/app/data:rw
|
||||
- media:/app/media:rw
|
||||
command: bash -c 'python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info'
|
||||
command: |-
|
||||
bash -c 'python manage.py migrate --noinput &&
|
||||
python manage.py createcachetable &&
|
||||
gunicorn babybuddy.wsgi -b :8000 --log-level=info \
|
||||
--worker-tmp-dir=/dev/shm --log-file=- \
|
||||
--workers=2 --threads=4 --worker-class=gthread'
|
||||
ports:
|
||||
- "8000:8000" # For Portainer, select another port for babybuddy such as 7000, for example "7000:8000"
|
||||
restart: unless-stopped
|
||||
|
|
|
@ -27,7 +27,12 @@ services:
|
|||
volumes:
|
||||
- media:/app/media:rw
|
||||
# Sleep 5 seconds to allow the db to to come up;
|
||||
command: bash -c 'sleep 5 && python manage.py migrate --noinput && python manage.py createcachetable && gunicorn babybuddy.wsgi -b :8000 --log-level=info'
|
||||
command: |-
|
||||
bash -c 'python manage.py migrate --noinput &&
|
||||
python manage.py createcachetable &&
|
||||
gunicorn babybuddy.wsgi -b :8000 --log-level=info \
|
||||
--worker-tmp-dir=/dev/shm --log-file=- \
|
||||
--workers=2 --threads=4 --worker-class=gthread'
|
||||
ports:
|
||||
- "8000:8000" # For Portainer, select another port for babybuddy such as 7000, for example "7000:8000"
|
||||
restart: unless-stopped
|
||||
|
|
Loading…
Reference in New Issue