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 10 environment:
11 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 12 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}"
  13 + - "MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-3306}"
13 14 volumes:
14 15 - db:/var/lib/mysql/
15 16 # create network to allow images to communicate with other images within the same network
... ... @@ -28,7 +29,8 @@ services:
28 29 environment:
29 30 - "WITH_DOCKER=${WITH_DOCKER:-y}"
30 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 34 volumes:
33 35 - ..:/home/pyros_user/app
34 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 41 - db
40 42 # create network to allow images to communicate with other images within the same network
41 43 networks:
42   - pyros-network:
43   - ipv4_address: "${IP_PYROS_USER}"
  44 + - pyros-network
  45 + #ipv4_address: "${IP_PYROS_USER}"
44 46  
45 47 # declaring volumes
46 48 volumes:
... ...