Skip to content

Commit

Permalink
Fix DNS issue, removed the fixed IPs workaround (#24)
Browse files Browse the repository at this point in the history
* Bump mysql_async_wasi to 0.31.5
  • Loading branch information
aalonsolopez authored Mar 7, 2024
1 parent 31bae7f commit 65b18e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ anyhow = "1.0"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
url = "2.3"
mysql_async_wasi = "0.31"
mysql_async_wasi = "=0.31.5"
hyper_wasi = { version = "0.15", features = ["full"] }
tokio_wasi = { version = "1", features = ["io-util", "fs", "net", "time", "rt", "macros"] }
tokio_wasi = { version = "1", features = ["io-util", "fs", "net", "time", "rt", "macros"] }
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN <<EOT bash
EOT

FROM buildbase AS build
COPY Cargo.toml orders.json update_order.json .
COPY Cargo.toml orders.json update_order.json ./
COPY src ./src
# Build the Wasm binary
RUN cargo build --target wasm32-wasi --release
Expand Down
18 changes: 1 addition & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ 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 @@ -16,25 +13,12 @@ services:
ports:
- 8080:8080
environment:
DATABASE_URL: mysql://root:whalehello@172.20.0.5:3306/mysql
DATABASE_URL: mysql://root:whalehello@db: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 65b18e2

Please sign in to comment.