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 ### ''' ''' ### Opaque ### '''
NOPAQUE_ADMIN = os.environ.get('NOPAQUE_ADMIN') NOPAQUE_ADMIN = os.environ.get('NOPAQUE_ADMIN')
NOPAQUE_STORAGE = '/mnt/opaque' NOPAQUE_STORAGE = '/mnt/nopaque'
@staticmethod @staticmethod
def init_app(app): def init_app(app):

View File

@ -2,13 +2,13 @@ version: '3'
services: services:
storage: 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 image: dperson/samba:latest
ports: ports:
- 445:445 - 445:445
restart: on-failure restart: on-failure
volumes: volumes:
- /srv/opaque/storage:/srv/opaque/storage - /srv/nopaque/storage:/srv/nopaque/storage
worker: worker:
image: docker:dind image: docker:dind
ports: ports:
@ -16,7 +16,7 @@ services:
privileged: true privileged: true
restart: on-failure restart: on-failure
volumes: volumes:
- /mnt/opaque:/mnt/opaque - /mnt/nopaque:/mnt/nopaque
viz: viz:
image: dockersamples/visualizer:latest image: dockersamples/visualizer:latest
ports: ports:

View File

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

View File

@ -12,7 +12,7 @@ services:
ports: ports:
- 5000:5000 - 5000:5000
volumes: volumes:
- /mnt/opaque:/mnt/opaque - /mnt/nopaque:/mnt/nopaque
- ./app:/home/nopaque/app - ./app:/home/nopaque/app
- ./logs:/home/nopaque/logs - ./logs:/home/nopaque/logs
- ./migrations:/home/nopaque/migrations - ./migrations:/home/nopaque/migrations
@ -29,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:
- /mnt/opaque:/mnt/opaque - /mnt/nopaque:/mnt/nopaque
- ./logs:/home/nopaqued/logs - ./logs:/home/nopaqued/logs
- ../opaque_daemon/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh - ../opaque_daemon/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh
- ../opaque_daemon/nopaqued.py:/home/nopaqued/opaque_daemon.py - ../opaque_daemon/nopaqued.py:/home/nopaqued/opaque_daemon.py
@ -40,6 +40,6 @@ services:
env_file: db.env env_file: db.env
image: postgres:11 image: postgres:11
volumes: volumes:
- /srv/opaque/database:/var/lib/postgresql/data - /srv/nopaque/database:/var/lib/postgresql/data
redis: redis:
image: redis:5 image: redis:5

View File

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