Feat: docker compose done

This commit is contained in:
2025-04-18 20:23:21 +08:00
parent 947c10f231
commit 13ad4d7439
6 changed files with 125 additions and 2 deletions

24
docker-compose.yml Normal file
View File

@@ -0,0 +1,24 @@
---
services:
db:
image: mongo:8.0
volumes:
- mongo:/data/db
backend:
build:
context: ./backend
environment:
PORT: 8888
HOST: 0.0.0.0
MONGO_CONNECTION_STRING: mongodb://db:27017/todo
depends_on:
- db
frontend:
build:
context: ./frontend
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- 8080:80
volumes:
mongo: {}