-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.46 KB
/
docker-compose.yml
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
services:
backend:
build: ./backend
container_name: jira-analyzer-backend
ports:
- "${BACKEND_PORT:-8000}:8000"
environment:
# Server Configuration
- HOST=0.0.0.0
- PORT=8000
- CORS_ORIGINS=["http://localhost:${FRONTEND_PORT:-80}"]
volumes:
- ./backend/app:/app/app
- ./backend/tests:/app/tests
- jira-analyzer-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
interval: 30s
timeout: 10s
retries: 3
frontend:
build: ./frontend
container_name: jira-analyzer-frontend
environment:
- VITE_API_URL=http://localhost:${BACKEND_PORT:-8000}
volumes:
- frontend_build:/app/dist
caddy:
image: caddy:2-alpine
container_name: jira-analyzer-caddy
ports:
- "${FRONTEND_PORT:-80}:80"
- "443:443"
volumes:
- frontend_build:/usr/share/caddy
- ./frontend/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- frontend
- backend
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
volumes:
jira-analyzer-data:
frontend_build: # Shared volume between frontend build and Caddy
caddy_data: # Persistent volume for Caddy SSL certificates
caddy_config: # Persistent volume for Caddy configuration
networks:
default:
name: jira-analyzer-network