-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (41 loc) · 935 Bytes
/
docker-compose.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
version: '3.1'
services:
api:
image: 'api-docker.jar'
container_name: api
network_mode: bridge
expose:
- 8080
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
links:
- db
environment:
- database_url=jdbc:postgresql://db:5432/postgres
- database_username=postgres
- database_password=pass
- flyway_url=jdbc:postgresql://db:5432
- flyway_schemas=postgres
- flyway_username=postgres
- flyway_password=pass
db:
image: postgres:15-alpine
container_name: db
network_mode: bridge
expose:
- 5432
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=pass
- POSTGRES_USER=postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./scripts/db:/docker-entrypoint-initdb.d/