-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
43 lines (40 loc) · 1.07 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
version: '2.1'
services:
postgres:
image: postgres:9.6
container_name: migrations-postgres # this will be the adminer server
environment:
- POSTGRES_USER=goose
- POSTGRES_PASSWORD=goose
- POSTGRES_DB=goose
- PGDATA=/pgdata
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U goose"]
interval: 10s
timeout: 5s
retries: 5
adminer:
image: adminer:4.7
container_name: migrations-adminer
depends_on:
postgres:
condition: service_healthy
ports:
- 8080:8080
goose:
image: fpopic/goose:1.0
build:
context: .
user: 1000:1000 # put your non-root user's uid:gid (run cmd `id`)
container_name: migrations-goose
depends_on:
postgres:
condition: service_healthy
environment:
- GOOSE_DRIVER=postgres
# e.g. postgres://{user}:{password}@{hostname}:{port}/{database-name}
- GOOSE_DBSTRING=postgres://goose:goose@migrations-postgres:5432/goose?sslmode=disable
volumes:
- ./db/migrations:/app/db/migrations:rw