Add a Docker+wasm sample application featuring a WasmEdge-based microservice, a MySQL database and an Nginx web server for frontend UI files.
Signed-off-by: Michael Yuan <michael@secondstate.io>
This commit is contained in:
26
wasmedge-mysql-nginx/.docker/docker-compose.yml
Normal file
26
wasmedge-mysql-nginx/.docker/docker-compose.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
services:
|
||||
frontend:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- 8090:80
|
||||
volumes:
|
||||
- ./frontend:/usr/share/nginx/html
|
||||
|
||||
backend:
|
||||
image: demo-microservice
|
||||
build:
|
||||
context: backend/
|
||||
platforms:
|
||||
- wasi/wasm32
|
||||
ports:
|
||||
- 8080:8080
|
||||
environment:
|
||||
DATABASE_URL: mysql://root:whalehello@db:3306/mysql
|
||||
RUST_BACKTRACE: full
|
||||
restart: unless-stopped
|
||||
runtime: io.containerd.wasmedge.v1
|
||||
|
||||
db:
|
||||
image: mariadb:10.9
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: whalehello
|
||||
Reference in New Issue
Block a user