Skip to content

Commit 2eea498

Browse files
authored
Merge pull request #3 from chris-crone/remove-host-network
Remove host networking requirement for containers
2 parents d34701b + 0f23c46 commit 2eea498

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,5 @@ Using a version of Docker with Wasm WASI support, start the example stack using
8383
docker compose up
8484
```
8585

86-
Initialize the database using the `/init` endpoint:
87-
88-
```bash
89-
docker run --rm --network host curlimages/curl curl http://localhost:8080/init
90-
```
91-
92-
List the current orders using the `/orders` endpoint:
93-
94-
```bash
95-
docker run --rm --network host curlimages/curl curl http://localhost:8080/orders
96-
```
97-
98-
Add the example orders:
99-
100-
```bash
101-
cat orders.json | docker run --rm --network host -i curlimages/curl curl http://localhost:8080/create_orders -X POST -d @-
102-
```
86+
This will build and run the Rust Wasm server and startup a MySQL backing database.
87+
You can then follow the steps above to interact with the Web server.

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ services:
77
- wasi/wasm32
88
ports:
99
- 8080:8080
10-
network_mode: host
1110
environment:
12-
DATABASE_URL: mysql://root:whalehello@localhost:3306/mysql
11+
DATABASE_URL: mysql://root:whalehello@db:3306/mysql
1312
RUST_BACKTRACE: full
1413
restart: unless-stopped
1514
runtime: io.containerd.wasmedge.v1
1615
db:
1716
image: mariadb:10.9
1817
environment:
1918
MYSQL_ROOT_PASSWORD: whalehello
20-
network_mode: host

0 commit comments

Comments
 (0)