Updates for stack deployment

This commit is contained in:
Patrick Jentsch 2019-12-02 11:06:46 +01:00
parent 6317a479f5
commit da2f7f6c7d
2 changed files with 9 additions and 13 deletions

View File

@ -23,7 +23,7 @@ def create_app(config_name):
db.init_app(app) db.init_app(app)
login_manager.init_app(app) login_manager.init_app(app)
mail.init_app(app) mail.init_app(app)
socketio.init_app(app, message_queue='redis://redis:6379') socketio.init_app(app, message_queue='redis://redis:6379/')
from . import events from . import events

View File

@ -6,6 +6,10 @@ services:
placement: placement:
constraints: constraints:
- node.role == manager - node.role == manager
labels:
- com.docker.lb.hosts=web.opaque
- com.docker.lb.port=8080
- com.docker.lb.sticky_session_cookie=session
env_file: env_file:
- db.env - db.env
- web.env - web.env
@ -13,7 +17,7 @@ services:
ports: ports:
- 5000:5000 - 5000:5000
volumes: volumes:
- storage:/mnt/opaque - /mnt/opaque:/mnt/opaque
- ./logs:/home/opaque/logs - ./logs:/home/opaque/logs
daemon: daemon:
deploy: deploy:
@ -25,7 +29,7 @@ services:
- web.env - web.env
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
volumes: volumes:
- storage:/mnt/opaque - /mnt/opaque:/mnt/opaque
- ./logs:/home/opaque_daemon/logs - ./logs:/home/opaque_daemon/logs
- $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json - $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json
db: db:
@ -34,7 +38,7 @@ services:
constraints: constraints:
- node.role == manager - node.role == manager
env_file: db.env env_file: db.env
image: postgres:11-alpine image: postgres:11
volumes: volumes:
- /srv/opaque/database:/var/lib/postgresql/data - /srv/opaque/database:/var/lib/postgresql/data
redis: redis:
@ -42,12 +46,4 @@ services:
placement: placement:
constraints: constraints:
- node.role == manager - node.role == manager
image: redis:alpine image: redis:5
volumes:
storage:
driver: local
driver_opts:
device: "//127.0.0.1/opaque_storage"
o: "gid=1000,password=opaque,uid=1000,username=opaque"
type: cifs