Commit 96a0355e6c47961c6cee6ee79a88c258623fc1f2

Authored by Alexis Koralewski
1 parent 38c58b04
Exists in dev

simplifying by removing two volumes for the db service, add ip adress for the pyros service

Showing 1 changed file with 10 additions and 4 deletions   Show diff stats
docker/docker-compose.yml
@@ -12,8 +12,6 @@ services: @@ -12,8 +12,6 @@ services:
12 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}" 12 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}"
13 volumes: 13 volumes:
14 - db:/var/lib/mysql/ 14 - db:/var/lib/mysql/
15 - - db:/var/lib/mysql-files  
16 - - ./mysql/:/etc/mysql/  
17 # create network to allow images to communicate with other images within the same network 15 # create network to allow images to communicate with other images within the same network
18 networks: 16 networks:
19 - pyros-network 17 - pyros-network
@@ -30,6 +28,7 @@ services: @@ -30,6 +28,7 @@ services:
30 environment: 28 environment:
31 - "WITH_DOCKER=${WITH_DOCKER:-y}" 29 - "WITH_DOCKER=${WITH_DOCKER:-y}"
32 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}" 30 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}"
  31 + - "IP_PYROS_USER=${IP_PYROS_USER:-172.28.1.5}"
33 volumes: 32 volumes:
34 - ..:/home/pyros_user/app 33 - ..:/home/pyros_user/app
35 # tells which port of local machine can communicate with the docker image (host:container), host is your local machine 34 # tells which port of local machine can communicate with the docker image (host:container), host is your local machine
@@ -40,7 +39,9 @@ services: @@ -40,7 +39,9 @@ services:
40 - db 39 - db
41 # create network to allow images to communicate with other images within the same network 40 # create network to allow images to communicate with other images within the same network
42 networks: 41 networks:
43 - - pyros-network 42 + pyros-network:
  43 + ipv4_address: "${IP_PYROS_USER}"
  44 +
44 # declaring volumes 45 # declaring volumes
45 volumes: 46 volumes:
46 db: 47 db:
@@ -51,4 +52,9 @@ networks: @@ -51,4 +52,9 @@ networks:
51 pyros-network: 52 pyros-network:
52 #bridge is the default network driver 53 #bridge is the default network driver
53 driver: bridge 54 driver: bridge
54 -  
55 \ No newline at end of file 55 \ No newline at end of file
  56 + ipam:
  57 + driver: default
  58 + config:
  59 + # we can define any ip adresses
  60 + - subnet: 172.28.0.0/16
  61 + gateway: 172.28.5.254
56 \ No newline at end of file 62 \ No newline at end of file