forked from MobilityData/mobility-feed-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
99 lines (99 loc) · 2.7 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
services:
postgres:
container_name: database
image: postgis/postgis
# Fix warning message on arm64 machines
platform: linux/amd64
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 20s
timeout: 5s
retries: 5
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PORT=${POSTGRES_PORT}
- PGUSER=${PGUSER}
volumes:
- ./data:/var/lib/postgresql/data
expose:
- ${POSTGRES_PORT}
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
networks:
- local
postgres-test:
container_name: database_test
image: postgis/postgis
# Fix warning message on arm64 machines
platform: linux/amd64
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 20s
timeout: 5s
retries: 5
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}Test
- POSTGRES_PORT=${POSTGRES_PORT}
- PGUSER=${PGUSER}
volumes:
- ./data-test:/var/lib/postgresql/data
expose:
- ${POSTGRES_PORT}0
ports:
- ${POSTGRES_PORT}0:${POSTGRES_PORT}
networks:
- local
liquibase:
container_name: liquibase_update
image: liquibase/liquibase
restart: on-failure
volumes:
- ./liquibase:/liquibase/changelog
command:
- --url=jdbc:postgresql://postgres:${POSTGRES_PORT}/${POSTGRES_DB}
- --changeLogFile=changelog.xml
- --username=${POSTGRES_USER}
- --password=${POSTGRES_PASSWORD}
- --log-level=1
- update
depends_on:
postgres:
condition: service_healthy
networks:
- local
liquibase-test:
container_name: liquibase_update_test
image: liquibase/liquibase
restart: on-failure
volumes:
- ./liquibase:/liquibase/changelog
command:
- --url=jdbc:postgresql://postgres-test:${POSTGRES_PORT}/${POSTGRES_DB}Test
- --changeLogFile=changelog.xml
- --username=${POSTGRES_USER}
- --password=${POSTGRES_PASSWORD}
- --log-level=1
- update
depends_on:
postgres-test:
condition: service_healthy
networks:
- local
schemaspy:
image: andrewjones/schemaspy-postgres:latest
container_name: schema_generation
command: [ "-db", "${POSTGRES_DB}", "-host", "postgres", "-port", "${POSTGRES_PORT}", "-s", "public", "-u", "${POSTGRES_USER}", "-p", "${POSTGRES_PASSWORD}" ]
volumes:
- ./docs/${SCHEMA_SPY_DOC}:/output
depends_on:
liquibase:
condition: service_completed_successfully
networks:
- local
networks:
local:
driver: bridge