-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (58 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
61 lines (58 loc) · 1.41 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
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: nthtime
POSTGRES_USER: nthtime
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U nthtime']
interval: 10s
timeout: 5s
retries: 5
api:
build:
context: services/api
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: nthtime
DB_USER: nthtime
DB_PASSWORD: ${DB_PASSWORD}
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
ADMIN_SECRET: ${ADMIN_SECRET}
FRONTEND_URL: ${FRONTEND_URL}
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:8080/api/health']
interval: 15s
timeout: 5s
retries: 10
start_period: 60s
web:
build: .
ports:
- '3000:3000'
restart: unless-stopped
depends_on:
- api
environment:
PORT: 3000
SPRING_BOOT_URL: http://api:8080
FRONTEND_URL: ${FRONTEND_URL}
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:3000/api/health']
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
volumes:
pgdata: