Make compose file swarm ready.

This commit is contained in:
Patrick Jentsch 2019-09-09 10:49:17 +02:00
parent a8395740b8
commit 50a31967f2
2 changed files with 17 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
db.env
web.env
__pycache__

View File

@ -5,13 +5,16 @@ services:
depends_on:
- db
- redis
deploy:
placement:
constraints:
- node.role == manager
env_file:
- db.env
- web.env
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque:development
ports:
- 5000:5000
restart: always
volumes:
- /opaque_storage:/opaque_storage
- ./app:/home/opaque/app
@ -21,17 +24,26 @@ services:
daemon:
depends_on:
- db
deploy:
placement:
constraints:
- node.role == manager
env_file: db.env
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
restart: always
volumes:
- $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json
db:
deploy:
placement:
constraints:
- node.role == manager
env_file: db.env
image: postgres:alpine
restart: always
volumes:
- /opaque_database:/var/lib/postgresql/data
redis:
deploy:
placement:
constraints:
- node.role == manager
image: redis:alpine
restart: always