-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (70 loc) · 1.61 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (70 loc) · 1.61 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
services:
db:
image: postgres:16-alpine
container_name: iterview-db
ports:
- "5432:5432"
environment:
POSTGRES_USER: iterview_user
POSTGRES_PASSWORD: iterview_password
POSTGRES_DB: iterview_db
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U iterview_user -d iterview_db" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- iterview-network
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Backend API
backend:
build: ./backend
container_name: iterview-backend
ports:
- "8080:8080"
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/iterview_db
- SPRING_DATASOURCE_USERNAME=iterview_user
- SPRING_DATASOURCE_PASSWORD=iterview_password
depends_on:
db:
condition: service_healthy
networks:
- iterview-network
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Frontend Web (Astro SSR)
frontend:
build: ./frontend
container_name: iterview-frontend
ports:
- "4321:4321"
environment:
- PUBLIC_API_URL=http://localhost:8080/api
- INTERNAL_API_URL=http://backend:8080/api
depends_on:
- backend
networks:
- iterview-network
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
pgdata:
networks:
iterview-network:
driver: bridge