forked from iii123iii/Crystal-PDF
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (73 loc) · 1.72 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (73 loc) · 1.72 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
services:
postgres:
image: postgres:16-alpine
container_name: crystalpdf-postgres
restart: unless-stopped
environment:
POSTGRES_DB: crystalpdf
POSTGRES_USER: crystalpdf
POSTGRES_PASSWORD: crystalpdf_secure_password
networks:
- crystalpdf-net
expose:
- "5432"
volumes:
- crystalpdf-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U crystalpdf -d crystalpdf"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
container_name: crystalpdf-backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
- SPRING_PROFILES_ACTIVE=prod
- DB_URL=jdbc:postgresql://postgres:5432/crystalpdf
- DB_USERNAME=crystalpdf
- DB_PASSWORD=crystalpdf_secure_password
- STORAGE_PATH=/app/storage
volumes:
- crystalpdf-storage:/app/storage
networks:
- crystalpdf-net
# Not exposed to host — only reachable via the frontend proxy
expose:
- "8080"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/api/health || exit 1"]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
deploy:
resources:
limits:
memory: 1g
frontend:
build:
context: ./frontend
container_name: crystalpdf-frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
networks:
- crystalpdf-net
deploy:
resources:
limits:
memory: 128m
networks:
crystalpdf-net:
driver: bridge
volumes:
crystalpdf-db:
crystalpdf-storage: