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 12 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}"
13 13 volumes:
14 14 - db:/var/lib/mysql/
15   - - db:/var/lib/mysql-files
16   - - ./mysql/:/etc/mysql/
17 15 # create network to allow images to communicate with other images within the same network
18 16 networks:
19 17 - pyros-network
... ... @@ -30,6 +28,7 @@ services:
30 28 environment:
31 29 - "WITH_DOCKER=${WITH_DOCKER:-y}"
32 30 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}"
  31 + - "IP_PYROS_USER=${IP_PYROS_USER:-172.28.1.5}"
33 32 volumes:
34 33 - ..:/home/pyros_user/app
35 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 39 - db
41 40 # create network to allow images to communicate with other images within the same network
42 41 networks:
43   - - pyros-network
  42 + pyros-network:
  43 + ipv4_address: "${IP_PYROS_USER}"
  44 +
44 45 # declaring volumes
45 46 volumes:
46 47 db:
... ... @@ -51,4 +52,9 @@ networks:
51 52 pyros-network:
52 53 #bridge is the default network driver
53 54 driver: bridge
54   -
55 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 62 \ No newline at end of file
... ...