-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
35 lines (33 loc) · 885 Bytes
/
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
services:
server:
build: .
container_name: server
ports:
- "8080:8080"
environment:
POSTGRES_URL: postgres://kodeuser:kodepassword@postgres:5432/kodedb?sslmode=disable
depends_on:
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
postgres:
image: postgres:16.3-alpine
container_name: postgres-db
environment:
POSTGRES_USER: kodeuser
POSTGRES_PASSWORD: kodepassword
POSTGRES_DB: kodedb
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U kodeuser -d kodedb" ]
interval: 5s
timeout: 5s
retries: 15
start_period: 5s
migrate:
build: migrations
environment:
POSTGRES_URL: postgres://kodeuser:kodepassword@postgres:5432/kodedb?sslmode=disable
depends_on:
postgres:
condition: service_healthy