diff --git a/README.md b/README.md index 40a1f13ed..3db952d01 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,6 @@ ``` docker-compose pull docker-compose up -d +docker-compose exec server ./manage.py migrate docker-compose exec server ./manage.py createsuperuser ``` diff --git a/docker-compose.yml b/docker-compose.yml index 54d856ad5..3da8514e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,24 +20,10 @@ services: - internal labels: - traefik.enable=false - database-migrate: - build: - context: . - image: docker.beryju.org/passbook/server:${TAG:-test} - command: - - ./manage.py - - migrate - networks: - - internal - restart: 'no' - environment: - - PASSBOOK_REDIS__HOST=redis - - PASSBOOK_POSTGRESQL__HOST=postgresql - - PASSBOOK_POSTGRESQL__PASSWORD=${PG_PASS:-thisisnotagoodpassword} server: build: context: . - image: docker.beryju.org/passbook/server:${TAG:-test} + image: docker.beryju.org/passbook/server:${SERVER_TAG:-latest} command: - uwsgi - uwsgi.ini @@ -54,10 +40,14 @@ services: - traefik.docker.network=internal - traefik.frontend.rule=PathPrefix:/ worker: - image: docker.beryju.org/passbook/server:${TAG:-test} + image: docker.beryju.org/passbook/server:${SERVER_TAG:-latest} command: - - ./manage.py + - celery - worker + - --autoscale=10,3 + - -E + - -B + - -A=passbook.root.celery networks: - internal labels: @@ -70,7 +60,7 @@ services: build: context: . dockerfile: static.Dockerfile - image: docker.beryju.org/passbook/static:${TAG:-test} + image: docker.beryju.org/passbook/static:latest networks: - internal labels: