diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ee2f1d1..7ad3104 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,12 +10,16 @@ services: environment: # 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 - "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}" - - "MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-3306}" volumes: - db:/var/lib/mysql/ # create network to allow images to communicate with other images within the same network networks: - pyros-network + healthcheck: + test: ["CMD", 'mysqladmin', 'ping', '-h', 'db', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD' ] + timeout: 10s + interval: 5s + retries: 20 # service image of python, that let users to interact with python scripts such as pyros. install: @@ -47,20 +51,14 @@ services: networks: - pyros-network #ipv4_address: "${IP_PYROS_USER}" - + restart: always + # declaring volumes volumes: db: driver: local - # declaring networks networks: pyros-network: #bridge is the default network driver - driver: bridge - 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 + driver: bridge \ No newline at end of file -- libgit2 0.21.2