Skip to content

Commit

Permalink
Merge pull request #22 from aalonsolopez/main
Browse files Browse the repository at this point in the history
Fix DNS error on WASM adding static IPs to every container on a new network
  • Loading branch information
hydai authored Feb 15, 2024
2 parents 5776081 + 9c26528 commit 31bae7f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ services:
- 8090:80
volumes:
- ./client:/usr/share/nginx/html
networks:
fixed:
ipv4_address: 172.20.0.3
server:
image: demo-microservice
platform: wasi/wasm
Expand All @@ -13,12 +16,25 @@ services:
ports:
- 8080:8080
environment:
DATABASE_URL: mysql://root:whalehello@db:3306/mysql
DATABASE_URL: mysql://root:whalehello@172.20.0.5:3306/mysql
RUST_BACKTRACE: full
DNS_SERVER: 127.0.0.11:53
restart: unless-stopped
runtime: io.containerd.wasmedge.v1
networks:
fixed:
ipv4_address: 172.20.0.4
db:
image: mariadb:10.9
environment:
MYSQL_ROOT_PASSWORD: whalehello
networks:
fixed:
ipv4_address: 172.20.0.5
networks:
fixed:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/16

0 comments on commit 31bae7f

Please sign in to comment.