-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
65 lines (59 loc) · 1.79 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
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2022-2023 CYBERTEC PostgreSQL International GmbH <[email protected]>
version: "3"
services:
# Single page application served via nginx web server
web_gui:
image: docker.io/cybertecpostgresql/cybertec_migrator-${EDITION}-web_gui:${VERSION}
depends_on:
core:
condition: service_started
volumes:
- ./volumes/web_gui/nginx/templates:/etc/nginx/templates
- ./volumes/web_gui/nginx/certs:/etc/nginx/certs
networks:
- common
ports:
- ${EXTERNAL_HTTP_PORT}:443
# Migrator core exposed as REST service API
core:
image: docker.io/cybertecpostgresql/cybertec_migrator-${EDITION}-core:${VERSION}
env_file: .env
environment:
# —— Internal database ——
- CORE_DB_HOST=core_db
- CORE_DB_PASSWORD=${CORE_DB_PASSWORD}
- CORE_DB_DATABASE=migrator
- TNS_ADMIN=/app/config/oracle/network/admin
depends_on:
core_db:
condition: service_healthy
volumes:
- ./volumes/core/config:/app/config
networks:
- common
# Internal Migrator database
core_db:
image: docker.io/postgres:13-alpine
environment:
# —— Postgres settings ——
- POSTGRES_PASSWORD=${CORE_DB_PASSWORD}
volumes:
- core_db-data:/var/lib/postgresql/data
- ./volumes/core_db/initdb.sh:/docker-entrypoint-initdb.d/init-user-db.sh:Z
healthcheck:
# Ensures that the database is ready *and* the password is in sync
test:
[
"CMD-SHELL",
'psql --username=postgres --dbname=migrator --command="ALTER USER postgres WITH PASSWORD ''${CORE_DB_PASSWORD}''"',
]
interval: 5s
timeout: 5s
retries: 10
networks:
- common
volumes:
core_db-data:
networks:
common: