This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
forked from punosmobile/jkr-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (78 loc) · 2.35 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: "3.9"
volumes:
postgis-data:
driver: local
postgis-data-test:
driver: local
services:
db:
image: jkr/postgis
build:
context: ./docker/postgis
volumes:
- postgis-data:/var/lib/postgresql/data
- ./docker/postgis/init_db:/docker-entrypoint-initdb.d
- ./docker/postgis/postgresql.conf:/etc/postgresql/postgresql.conf
- ./docker/postgis/logs:/var/log/postgresql
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- JKR_DB=${JKR_DB}
- JKR_USER=${JKR_USER}
- JKR_PASSWORD=${JKR_PASSWORD}
ports:
- ${JKR_DB_PORT}:5432
command: postgres -c config_file=/etc/postgresql/postgresql.conf
db_test:
image: jkr/postgis
container_name: jkr_test_database
build:
context: ./docker/postgis/test
volumes:
- postgis-data-test:/var/lib/postgresql/data
- ./docker/postgis/test/init_test_db:/docker-entrypoint-initdb.d
- ./docker/postgis/postgresql.conf:/etc/postgresql/postgresql.conf
- ./docker/postgis/test/logs:/var/log/postgresql
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- JKR_TEST_DB=${JKR_TEST_DB}
- JKR_USER=${JKR_USER}
- JKR_PASSWORD=${JKR_TEST_PASSWORD}
- PGPORT=5433
ports:
- ${JKR_TEST_DB_PORT}:5433
command: postgres -c config_file=/etc/postgresql/postgresql.conf
flyway:
image: flyway/flyway
depends_on:
- db
profiles: [ "migration" ]
environment:
- FLYWAY_USER=${JKR_USER}
- FLYWAY_PASSWORD=${JKR_PASSWORD}
- FLYWAY_URL=jdbc:postgresql://db/${JKR_DB}
volumes:
- ./db/migrations:/flyway/sql
- ./db/flyway.conf:/flyway/conf/flyway.conf
command: migrate
flyway_test:
image: flyway/flyway
depends_on:
- db_test
profiles: [ "migration" ]
environment:
- FLYWAY_USER=${JKR_USER}
- FLYWAY_PASSWORD=${JKR_TEST_PASSWORD}
- FLYWAY_URL=jdbc:postgresql://db_test:5433/${JKR_TEST_DB}
volumes:
- ./db/migrations:/flyway/sql
- ./db/flyway.conf:/flyway/conf/flyway.conf
command: migrate
tbls:
image: k1low/tbls:latest
depends_on:
- db
profiles: [ "dev" ]
volumes:
- ./docs/db:/work/db
- ./db/.tbls.yml:/work/.tbls.yml
command: doc --rm-dist -c /work/.tbls.yml postgres://${JKR_USER}:${JKR_PASSWORD}@db:5432/${JKR_DB}?sslmode=disable /work/db