-
-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathcompose.yml
More file actions
28 lines (26 loc) · 599 Bytes
/
compose.yml
File metadata and controls
28 lines (26 loc) · 599 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
services:
app:
build: .
env_file: .env
ports:
- "8080:8080"
depends_on:
db:
condition: service_healthy
command: [ "sh", "-c", "/myapp/bin/migrate up && /myapp/bin/app" ]
restart: always
db:
image: postgres:18-alpine
environment:
TZ: "Asia/Singapore"
POSTGRES_DB: myapp_db
POSTGRES_USER: myapp_user
POSTGRES_PASSWORD: myapp_pass
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U myapp_user -d myapp_db" ]
interval: 3s
timeout: 5s
retries: 5
restart: always