deploy(minor): use SERVER_TAG, fix static container

This commit is contained in:
Langhammer, Jens 2019-10-09 14:29:44 +02:00
parent 2e15b24f0a
commit fff99f0e3d
2 changed files with 9 additions and 18 deletions

View File

@ -5,5 +5,6 @@
``` ```
docker-compose pull docker-compose pull
docker-compose up -d docker-compose up -d
docker-compose exec server ./manage.py migrate
docker-compose exec server ./manage.py createsuperuser docker-compose exec server ./manage.py createsuperuser
``` ```

View File

@ -20,24 +20,10 @@ services:
- internal - internal
labels: labels:
- traefik.enable=false - 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: server:
build: build:
context: . context: .
image: docker.beryju.org/passbook/server:${TAG:-test} image: docker.beryju.org/passbook/server:${SERVER_TAG:-latest}
command: command:
- uwsgi - uwsgi
- uwsgi.ini - uwsgi.ini
@ -54,10 +40,14 @@ services:
- traefik.docker.network=internal - traefik.docker.network=internal
- traefik.frontend.rule=PathPrefix:/ - traefik.frontend.rule=PathPrefix:/
worker: worker:
image: docker.beryju.org/passbook/server:${TAG:-test} image: docker.beryju.org/passbook/server:${SERVER_TAG:-latest}
command: command:
- ./manage.py - celery
- worker - worker
- --autoscale=10,3
- -E
- -B
- -A=passbook.root.celery
networks: networks:
- internal - internal
labels: labels:
@ -70,7 +60,7 @@ services:
build: build:
context: . context: .
dockerfile: static.Dockerfile dockerfile: static.Dockerfile
image: docker.beryju.org/passbook/static:${TAG:-test} image: docker.beryju.org/passbook/static:latest
networks: networks:
- internal - internal
labels: labels: