Add storage as volume

This commit is contained in:
Patrick Jentsch 2019-09-13 14:01:57 +02:00
parent 3913663c56
commit 1118beaf61

View File

@ -16,7 +16,7 @@ services:
ports: ports:
- 5000:5000 - 5000:5000
volumes: volumes:
- /mnt/opaque:/mnt/opaque - storage:/mnt/opaque
- ./app:/home/opaque/app - ./app:/home/opaque/app
- ./config.py:/home/opaque/config.py - ./config.py:/home/opaque/config.py
- ./logs:/home/opaque/logs - ./logs:/home/opaque/logs
@ -45,10 +45,19 @@ services:
env_file: db.env env_file: db.env
image: postgres:alpine image: postgres:alpine
volumes: volumes:
- /opaque_database:/var/lib/postgresql/data - /srv/opaque/database:/var/lib/postgresql/data
redis: redis:
deploy: deploy:
placement: placement:
constraints: constraints:
- node.role == manager - node.role == manager
image: redis:alpine image: redis:alpine
volumes:
storage:
driver: local
driver_opts:
device: "//127.0.0.1/opaque_storage"
o: "gid=1000,password=opaque,uid=1000,username=opaque"
type: cifs