-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.43 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.43 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
version: '3.8'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: spot-backend
ports:
- "5000:5000"
env_file:
- ./backend/.env
environment:
- FLASK_ENV=production
- PYTHONUNBUFFERED=1
volumes:
- ./backend:/app/backend
restart: unless-stopped
networks:
- spot-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/api/robot/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: spot-frontend
ports:
- "3000:3000"
depends_on:
- backend
environment:
- REACT_APP_API_URL=http://localhost:5000/api
restart: unless-stopped
networks:
- spot-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
nginx:
image: nginx:alpine
container_name: spot-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/ssl:/etc/nginx/ssl:ro
depends_on:
- backend
- frontend
restart: unless-stopped
networks:
- spot-network
networks:
spot-network:
driver: bridge
volumes:
spot-data:
driver: local