-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
46 lines (43 loc) · 1.16 KB
/
docker-compose-dev.yml
File metadata and controls
46 lines (43 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# docker-compose-dev.yml — 本地開發環境
#
# 使用方式:
# docker compose -f docker-compose-dev.yml up
#
# 前置條件:
# 先執行 python scripts/download_wheels.py 確保 pyodide/ 和 wheels/ 已存在
#
# 開啟瀏覽器:http://localhost:3000
# 停止:Ctrl+C 或 docker compose -f docker-compose-dev.yml down
services:
nginx:
image: nginx:alpine
volumes:
# 整個專案目錄掛載為 nginx 的 web root(唯讀)
- .:/usr/share/nginx/html:ro
# 使用開發專用的 nginx 設定
- ./docker/nginx-dev.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "3000:80" # 開發用 HTTP port
depends_on:
- proxy
networks:
- dev-network
proxy:
build:
context: .
dockerfile: docker/Dockerfile.dev-proxy
working_dir: /app/server
command: node index.js
volumes:
- ./server:/app/server:ro
- /app/server/node_modules # anonymous volume 保留容器內的 node_modules
expose:
- "3002"
environment:
- PORT=3002
- CHROME_PATH=/usr/local/bin/chrome-headless-shell
networks:
- dev-network
networks:
dev-network:
driver: bridge