-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.build.yml
56 lines (55 loc) · 1.59 KB
/
docker-compose.build.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
services:
postgresql:
image: postgres:16-alpine
volumes:
- postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
- POSTGRES_DB=${POSTGRES_DB:-planer}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 20s
retries: 10
backend:
build:
context: ./backend
dockerfile: Dockerfile
environment:
- SERVICE_FQDN_BACKEND_3333
- PORT=3333
- HOST=0.0.0.0
- LOG_LEVEL=debug
- APP_KEY=${SERVICE_PASSWORD_64_BACKEND}
- DB_USER=$SERVICE_USER_POSTGRES
- DB_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- DB_DATABASE=${POSTGRES_DB:-planer}
- SESSION_DRIVER=cookie
- DB_HOST=postgresql
- DB_PORT=5432
depends_on:
- postgresql
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3333/healthcheck || exit 1"]
interval: 5s
timeout: 20s
retries: 10
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
environment:
- SERVICE_FQDN_FRONTEND_3000
- SITE_URL=${SERVICE_FQDN_FRONTEND_3000}
- USOS_CONSUMER_KEY=$USOS_CONSUMER_KEY
- USOS_CONSUMER_SECRET=$USOS_CONSUMER_SECRET
- USOS_BASE_URL=${USOS_BASE_URL:-usos.pwr.edu.pl}
- NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_BACKEND_3333}
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000 || exit 1"]
interval: 5s
timeout: 20s
retries: 10
volumes:
postgresql-data: