-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (44 loc) · 1.05 KB
/
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
44
45
46
47
---
version: "3"
services:
postgres:
image: postgres:14-alpine
restart: unless-stopped
environment:
POSTGRES_PASSWORD: ytrssil
POSTGRES_USER: ytrssil
POSTGRES_DB: ytrssil
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 5s
timeout: 2s
retries: 5
api:
image: theedgeofrage/ytrssil:api
restart: unless-stopped
depends_on:
- postgres
environment:
DB_URI: "postgresql://ytrssil:ytrssil@postgres/ytrssil?sslmode=disable"
PORT: "80"
ports:
- "8080:80"
healthcheck:
test: "curl http://localhost:80/healthz"
interval: 5s
retries: 5
timeout: 2s
migrations:
image: theedgeofrage/ytrssil:migrations
restart: unless-stopped
depends_on:
- postgres
command:
- "-path=/migrations/"
- "-database"
- "postgresql://ytrssil:ytrssil@postgres/ytrssil?sslmode=disable"
- "up"
volumes:
postgres-data: