-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (80 loc) · 1.92 KB
/
docker-compose.yml
File metadata and controls
87 lines (80 loc) · 1.92 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
version: "3.9"
services:
# --- Server (NestJS + MongoDB) ---
server:
build:
context: ./backend
dockerfile: Dockerfile
container_name: server
ports:
- "8080:8080"
volumes:
- ./backend:/app
- /app/node_modules
environment:
- NODE_ENV=development
- MONGO_URI=mongodb://mongo:27017/nestdb
entrypoint: ["/bin/sh", "-lc"]
command: "/app/entrypoint.sh"
depends_on:
mongo:
condition: service_started
ngrok:
condition: service_healthy
restart: unless-stopped
mongo:
image: mongo:6
container_name: mongodb
command: ["--quiet", "--logpath", "/data/db/mongo.log", "--logappend"]
volumes:
- mongo_data:/data/db
ports:
- "27017:27017"
ngrok:
image: ngrok/ngrok:alpine
command:
- http
- server:8080
ports:
- "4040:4040"
env_file:
- ./backend/.env.local # or wherever your ngrok token is
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:4040/api/tunnels"]
interval: 2s
timeout: 3s
retries: 30
start_period: 5s
# --- Mobile client (Flutter builder) ---
client_mobile:
build:
context: ./frontend/mobile
dockerfile: Dockerfile
args:
- DEFAULT_API_URL=http://localhost:8080
- DEFAULT_API_KEY=${API_KEY:-default_key}
container_name: flutter_apk_builder
volumes:
- shared_output:/output
network_mode: "host"
# --- Web client (React frontend) ---
client_web:
build:
context: ./frontend/web
dockerfile: Dockerfile
container_name: react_frontend
ports:
- "8081:8081"
environment:
- NODE_ENV=production
volumes:
# shared volume where the Flutter APK will be copied
- shared_output:/app/public
depends_on:
- server
- client_mobile
stdin_open: true
tty: true
volumes:
mongo_data:
shared_output: