From 96a0355e6c47961c6cee6ee79a88c258623fc1f2 Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Fri, 12 Mar 2021 15:08:51 +0100 Subject: [PATCH] simplifying by removing two volumes for the db service, add ip adress for the pyros service --- docker/docker-compose.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c693496..4c81e67 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -12,8 +12,6 @@ services: - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}" volumes: - db:/var/lib/mysql/ - - db:/var/lib/mysql-files - - ./mysql/:/etc/mysql/ # create network to allow images to communicate with other images within the same network networks: - pyros-network @@ -30,6 +28,7 @@ services: environment: - "WITH_DOCKER=${WITH_DOCKER:-y}" - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}" + - "IP_PYROS_USER=${IP_PYROS_USER:-172.28.1.5}" volumes: - ..:/home/pyros_user/app # tells which port of local machine can communicate with the docker image (host:container), host is your local machine @@ -40,7 +39,9 @@ services: - db # create network to allow images to communicate with other images within the same network networks: - - pyros-network + pyros-network: + ipv4_address: "${IP_PYROS_USER}" + # declaring volumes volumes: db: @@ -51,4 +52,9 @@ networks: pyros-network: #bridge is the default network driver driver: bridge - \ No newline at end of file + ipam: + driver: default + config: + # we can define any ip adresses + - subnet: 172.28.0.0/16 + gateway: 172.28.5.254 \ No newline at end of file -- libgit2 0.21.2