Commit 48bacc35488bc496ffa154cef458d612585078cd

Authored by Alexis Koralewski
1 parent 9ea7c96d
Exists in dev

add mysql port as environment variable to both images

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
docker/docker-compose.yml
@@ -10,6 +10,7 @@ services: @@ -10,6 +10,7 @@ services:
10 environment: 10 environment:
11 # note : as db is an image of mysql, this root password will be set on the first installation on the image, if the value is changed, it will not be updated in the database 11 # note : as db is an image of mysql, this root password will be set on the first installation on the image, if the value is changed, it will not be updated in the database
12 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}" 12 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}"
  13 + - "MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-3306}"
13 volumes: 14 volumes:
14 - db:/var/lib/mysql/ 15 - db:/var/lib/mysql/
15 # create network to allow images to communicate with other images within the same network 16 # create network to allow images to communicate with other images within the same network
@@ -28,7 +29,8 @@ services: @@ -28,7 +29,8 @@ services:
28 environment: 29 environment:
29 - "WITH_DOCKER=${WITH_DOCKER:-y}" 30 - "WITH_DOCKER=${WITH_DOCKER:-y}"
30 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}" 31 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}"
31 - - "IP_PYROS_USER=${IP_PYROS_USER:-172.28.1.5}" 32 + - "MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-3306}"
  33 + #- "IP_PYROS_USER=${IP_PYROS_USER:-172.28.1.5}"
32 volumes: 34 volumes:
33 - ..:/home/pyros_user/app 35 - ..:/home/pyros_user/app
34 # tells which port of local machine can communicate with the docker image (host:container), host is your local machine 36 # tells which port of local machine can communicate with the docker image (host:container), host is your local machine
@@ -39,8 +41,8 @@ services: @@ -39,8 +41,8 @@ services:
39 - db 41 - db
40 # create network to allow images to communicate with other images within the same network 42 # create network to allow images to communicate with other images within the same network
41 networks: 43 networks:
42 - pyros-network:  
43 - ipv4_address: "${IP_PYROS_USER}" 44 + - pyros-network
  45 + #ipv4_address: "${IP_PYROS_USER}"
44 46
45 # declaring volumes 47 # declaring volumes
46 volumes: 48 volumes: