-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (39 loc) · 986 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (39 loc) · 986 Bytes
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
# OPTIONAL: Docker Compose stack for teams that prefer containers.
# Day-to-day development expects a host-installed Postgres (see scripts/manage.sh db-init).
#
# docker compose up --build
# # or: make compose-up
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: boilerplate
POSTGRES_USER: boilerplate
POSTGRES_PASSWORD: boilerplate
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U boilerplate -d boilerplate"]
interval: 5s
timeout: 5s
retries: 10
app:
build:
context: .
dockerfile: docker/Dockerfile
ports:
- "8080:8080"
environment:
SPRING_PROFILES_ACTIVE: local
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: boilerplate
DB_USER: boilerplate
DB_PASSWORD: boilerplate
depends_on:
postgres:
condition: service_healthy
volumes:
pgdata: