-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (49 loc) · 1.18 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (49 loc) · 1.18 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
services:
# Frontend - React app served via Nginx
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: shape-frontend
ports:
- "80:8080"
depends_on:
- backend
networks:
- shape-network
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Backend - Flask API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: shape-backend
ports:
- "5000:5000"
volumes:
- ./instance:/app/instance
env_file:
- ./config/.env.local
environment:
- FLASK_HOST=0.0.0.0
- FLASK_PORT=5000
- INSTANCE_DIR=/app/instance
- DATABASE_URL=sqlite:////app/instance/users.db
networks:
- shape-network
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 5000), timeout=2)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
shape-network:
driver: bridge