-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
108 lines (104 loc) · 2.6 KB
/
compose.yml
File metadata and controls
108 lines (104 loc) · 2.6 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
services:
live-server-dev:
build:
context: .
container_name: web_live_server_dev
stdin_open: true
tty: true
ports:
- "8081:8080"
volumes:
- ./src:/app:rw # Mount src to /app for live-server
command: >
sh -c "live-server --port=8080 --host=0.0.0.0 --no-browser --watch=. --wait=100"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
init: true
restart: unless-stopped
networks:
- dev-network
flask-dev:
build:
context: .
container_name: web_flask_dev
stdin_open: true
tty: true
env_file:
- ./.env
environment:
- FLASK_ENV=development
- PORT=8080
ports:
- "8082:8080"
volumes:
- ./app/flask:/app:rw # This now correctly mounts the folder containing app_flask.py
command: ["gunicorn", "-w", "1", "--bind", "0.0.0.0:8080", "--reload", "app_flask:app"]
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
init: true
restart: unless-stopped
networks:
- dev-network
fastapi-dev:
build:
context: .
container_name: web_fastapi_dev
stdin_open: true
tty: true
env_file:
- ./.env
environment:
- FLASK_ENV=development
- PORT=8080
ports:
- "8083:8080"
volumes:
- ./app/fast:/app:rw # This now correctly mounts the folder containing app_fastapi.py
command: ["uvicorn", "app_fastapi:app", "--host", "0.0.0.0", "--port", "8080", "--reload"]
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
init: true
restart: unless-stopped
networks:
- dev-network
node-dev:
build:
context: .
container_name: web_node_dev
env_file:
- ./.env
environment:
- NODE_ENV=development
- PORT=8080
ports:
- "8084:8080"
volumes:
- ./app/node:/app:rw # This now correctly mounts the folder containing app_node.js
- /app/node_modules # This prevents the local node_modules from overwriting the container's
# CORRECTED: No need to run npm install on every start
command: ["npm", "run", "dev"]
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
init: true
restart: unless-stopped
networks:
- dev-network
networks:
dev-network:
driver: bridge