Skip to content

Commit

Permalink
Added network address to Docker image services for host access
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Oct 23, 2023
1 parent 8a4a3fe commit 6714a44
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
version: "3.9"

networks:
source-web-console:
driver: bridge
source_web_console:
ipam:
driver: default
config:
- subnet: 172.18.0.0/16
gateway: 172.18.0.1

services:
# https://hub.docker.com/_/redis
Expand All @@ -13,7 +17,8 @@ services:
- ./docker/redis/config:/usr/local/etc/redis
- ./docker/redis/database:/data
networks:
- source-web-console
source_web_console:
ipv4_address: 172.18.0.2
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
retries: 3
Expand All @@ -35,7 +40,8 @@ services:
MARIADB_PASSWORD_FILE: /run/secrets/db_password
MARIADB_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
networks:
- source-web-console
source_web_console:
ipv4_address: 172.18.0.3
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
retries: 3
Expand All @@ -49,7 +55,8 @@ services:
- redis
- mariadb
networks:
- source-web-console
source_web_console:
ipv4_address: 172.18.0.4
environment:
- WAIT_HOSTS=redis:6379, mariadb:3306
healthcheck:
Expand Down

0 comments on commit 6714a44

Please sign in to comment.