Change storage dir

This commit is contained in:
Patrick Jentsch 2019-12-02 11:57:08 +01:00
parent f63a850175
commit 0c55c027db
5 changed files with 17 additions and 17 deletions

View File

@ -19,7 +19,7 @@ class Config:
''' ### Opaque ### '''
NOPAQUE_ADMIN = os.environ.get('NOPAQUE_ADMIN')
NOPAQUE_STORAGE = '/mnt/opaque'
NOPAQUE_STORAGE = '/mnt/nopaque'
@staticmethod
def init_app(app):

View File

@ -2,13 +2,13 @@ version: '3'
services:
storage:
command: ["-p", "-s", "opaque_storage;/srv/opaque/storage;no;no;no;opaque", "-u", "opaque;opaque"]
command: ["-p", "-s", "storage.nopaque;/srv/nopaque/storage;no;no;no;nopaque", "-u", "nopaque;nopaque"]
image: dperson/samba:latest
ports:
- 445:445
restart: on-failure
volumes:
- /srv/opaque/storage:/srv/opaque/storage
- /srv/nopaque/storage:/srv/nopaque/storage
worker:
image: docker:dind
ports:
@ -16,7 +16,7 @@ services:
privileged: true
restart: on-failure
volumes:
- /mnt/opaque:/mnt/opaque
- /mnt/nopaque:/mnt/nopaque
viz:
image: dockersamples/visualizer:latest
ports:

View File

@ -17,9 +17,9 @@ docker-compose --file dind_swarm.yml up --detach storage
sleep 3
echo "Mount network storage to host system..."
sudo mkdir -p /mnt/opaque
sudo umount /mnt/opaque
sudo mount -t cifs -o gid=${USER},password=opaque,uid=${USER},user=opaque,vers=3.0 //localhost/opaque_storage /mnt/opaque
sudo mkdir -p /mnt/nopaque
sudo umount /mnt/nopaque
sudo mount -t cifs -o gid=${USER},password=nopaque,uid=${USER},user=nopaque,vers=3.0 //localhost/storage.nopaque /mnt/nopaque
echo "Start worker service(s)"
docker-compose --file dind_swarm.yml up --detach --scale worker=${SWARM_WORKER_NUMBER} worker viz

View File

@ -12,7 +12,7 @@ services:
ports:
- 5000:5000
volumes:
- /mnt/opaque:/mnt/opaque
- /mnt/nopaque:/mnt/nopaque
- ./app:/home/nopaque/app
- ./logs:/home/nopaque/logs
- ./migrations:/home/nopaque/migrations
@ -29,7 +29,7 @@ services:
- web.env
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
volumes:
- /mnt/opaque:/mnt/opaque
- /mnt/nopaque:/mnt/nopaque
- ./logs:/home/nopaqued/logs
- ../opaque_daemon/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh
- ../opaque_daemon/nopaqued.py:/home/nopaqued/opaque_daemon.py
@ -40,6 +40,6 @@ services:
env_file: db.env
image: postgres:11
volumes:
- /srv/opaque/database:/var/lib/postgresql/data
- /srv/nopaque/database:/var/lib/postgresql/data
redis:
image: redis:5

View File

@ -7,7 +7,7 @@ services:
constraints:
- node.role == manager
labels:
- com.docker.lb.hosts=web.opaque
- com.docker.lb.hosts=nopaque
- com.docker.lb.port=8080
- com.docker.lb.sticky_session_cookie=session
env_file:
@ -17,8 +17,8 @@ services:
ports:
- 5000:5000
volumes:
- /mnt/opaque:/mnt/opaque
- ./logs:/home/opaque/logs
- /mnt/nopaque:/mnt/nopaque
- ./logs:/home/nopaque/logs
daemon:
deploy:
placement:
@ -29,9 +29,9 @@ services:
- web.env
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
volumes:
- /mnt/opaque:/mnt/opaque
- ./logs:/home/opaque_daemon/logs
- $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json
- /mnt/nopaque:/mnt/nopaque
- ./logs:/home/nopaqued/logs
- $HOME/.docker/config.json:/home/nopaqued/.docker/config.json
db:
deploy:
placement:
@ -40,7 +40,7 @@ services:
env_file: db.env
image: postgres:11
volumes:
- /srv/opaque/database:/var/lib/postgresql/data
- /srv/nopaque/database:/var/lib/postgresql/data
redis:
deploy:
placement: