-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.35 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.35 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
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: interviewbank
POSTGRES_USER: ib_user
POSTGRES_PASSWORD: ib_pass
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ib_user -d interviewbank"]
interval: 10s
timeout: 5s
retries: 5
interview-bank-api:
build:
context: ./service
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: prod
DATABASE_URL: ${DATABASE_URL:-jdbc:postgresql://postgres:5432/interviewbank}
DATABASE_USERNAME: ${DATABASE_USERNAME:-ib_user}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-ib_pass}
JWT_SECRET: ${JWT_SECRET:-change-me-in-production-minimum-256-bits-long}
APP_CORS_ALLOWED_ORIGINS: http://localhost:5173
ports:
- "8080:8080"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/actuator/health >/dev/null || exit 1"]
interval: 30s
timeout: 10s
retries: 3
interview-bank-ui:
build:
context: ./ui
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
- interview-bank-api
ports:
- "5173:80"
volumes:
pgdata: