-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yaml
46 lines (43 loc) · 1.08 KB
/
docker-compose.yaml
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
version: "3.8"
services:
db:
container_name: gomin_db
image: postgres:15.2
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: gomin
ports:
- "5435:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test -d gomin"]
interval: 10s
timeout: 5s
retries: 5
migrate:
container_name: gomin_migrate
depends_on:
- db
image: arigaio/atlas:latest
volumes:
- "./database:/tmp/database"
command: >
schema apply \
--auto-approve \
--url "postgres://test:test@gomin_db:5432/gomin?sslmode=disable" \
--to "file://tmp/database/schema.hcl" \
--dev-url "postgres://test:test@gomin_db:5432/gomin?sslmode=disable"
api:
build:
context: .
container_name: gomin_api
depends_on:
- db
ports:
- '1323:1323'
restart: always
environment:
# Must be prefixed with APP_
# See pkg/common/config/config.go and viper for more details
- APP_DB_URL=postgres://test:test@gomin_db:5432/gomin
- APP_PORT=1323