From 0bab85f5cfac7730c9c63cf4f3ca8b011d2ddb8c Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Sat, 7 Mar 2020 02:54:56 +0100 Subject: [PATCH] Update local dev compose and stack setup --- docker-compose.yaml | 9 ++++++++- swarm-stack.yml | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 1308815..1edf6f8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '3' +version: '3.7' services: backup: build: ./src @@ -8,6 +8,9 @@ services: labels: restic-compose-backup.volumes: true restic-compose-backup.volumes.include: 'src' + networks: + - default + - global volumes: # Map in docker socket - /var/run/docker.sock:/tmp/docker.sock:ro @@ -68,3 +71,7 @@ volumes: mysqldata: mariadbdata: pgdata: + +networks: + global: + external: true diff --git a/swarm-stack.yml b/swarm-stack.yml index 10d666a..5a56d76 100644 --- a/swarm-stack.yml +++ b/swarm-stack.yml @@ -10,8 +10,14 @@ services: - MYSQL_DATABASE=mydb - MYSQL_USER=myuser - MYSQL_PASSWORD=mypassword + networks: + - global volumes: - mariadbdata:/var/lib/mysql volumes: mariadbdata: + +networks: + global: + external: true