-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
166 lines (155 loc) · 4.97 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# NOTE:
# * When specifying the GEODATA_PASSWORD (or ORACLE_PASSWORD) it can NOT be longer than 16 characters;
# this is a limitation of the default password policy in Oracle.
# For SQL Server the password must be at least 8 characters long and contain characters from three of
# the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols.
#
# * if you have set GEOSERVER_DATA_DIR in your local environment make sure to override that when
# creating and deploying this stack
#
name: tailormap-data
volumes:
postgis-db:
sqlserver-db:
oracle-db:
geoserver-data:
geoserver-build-cache:
networks:
tailormap-data:
name: tailormap-data
tailormap-viewer:
name: tailormap-viewer
external: true
traefik:
name: traefik
external: true
services:
postgis:
container_name: postgis
image: docker.b3p.nl/tailormap/tailormap-data_postgis:snapshot
build:
context: postgis
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-fa6efb5b-075b-4b7b-aab0-96108cd77e76}
GEODATA_PASSWORD: ${GEODATA_PASSWORD:-07d8313e-75b1-45}
volumes:
- postgis-db:/var/lib/postgresql/data
ports:
- "${BIND_IP:-127.0.0.1}:5432:5432"
networks:
- tailormap-data
- tailormap-viewer
labels:
traefik.enable: false
healthcheck:
interval: 1m
timeout: 5s
retries: 5
start_period: 20s
test: su postgres -c pg_isready
restart: unless-stopped
sqlserver:
container_name: sqlserver
image: docker.b3p.nl/tailormap/tailormap-data_sqlserver:snapshot
build:
context: sqlserver
environment:
SA_PASSWORD: ${SA_PASSWORD:-fa6efb5b-075b-4b7b-aab0-96108cd77e76}
GEODATA_PASSWORD: ${GEODATA_PASSWORD:-07d8313e-75b1-45}
ACCEPT_EULA: Y
volumes:
- sqlserver-db:/var/opt/mssql
ports:
- "${BIND_IP:-127.0.0.1}:1433:1433"
networks:
- tailormap-data
- tailormap-viewer
labels:
traefik.enable: false
healthcheck:
interval: 1m
timeout: 5s
retries: 5
start_period: 20s
test: /opt/mssql-tools18/bin/sqlcmd -No -U sa -P $$SA_PASSWORD -Q "select 1" -b -o /dev/null
restart: unless-stopped
oracle:
container_name: oracle
image: docker.b3p.nl/tailormap/tailormap-data_oracle:snapshot
build:
context: oracle
environment: # Note Oracle has default maximum password length of 16!
ORACLE_PASSWORD: ${ORACLE_PASSWORD:-fa6efb5b-075b-4b}
# this user is created in XEPDB1, not in XE
APP_USER: "geodata"
APP_USER_PASSWORD: ${GEODATA_PASSWORD:-07d8313e-75b1-45}
GEODATA_PASSWORD: ${GEODATA_PASSWORD:-07d8313e-75b1-45}
volumes:
- oracle-db:/opt/oracle/oradata
ports:
- "${BIND_IP:-127.0.0.1}:1521:1521"
networks:
- tailormap-data
- tailormap-viewer
labels:
traefik.enable: false
healthcheck:
interval: 1m
timeout: 5s
retries: 5
start_period: 1m
test: healthcheck.sh
restart: unless-stopped
geoserver-builder: # use maven to build a war overlay of geoserver
image: tailormap/tailormap-data_geoserver-builder
build:
context: geoserver
target: BUILDER
restart: "no"
network_mode: none
labels:
traefik.enable: false
volumes:
- geoserver-build-cache:/root/.m2
geoserver:
depends_on:
- geoserver-builder
- postgis
- oracle
- sqlserver
container_name: geoserver
image: docker.b3p.nl/tailormap/tailormap-data_geoserver:snapshot
build:
context: geoserver
target: GEOSERVER
args:
GEOSERVER_DATA_DIR: ${GEOSERVER_DATA_DIR:-/opt/geoserver-data}
environment:
GEOSERVER_DATA_DIR: ${GEOSERVER_DATA_DIR:-/opt/geoserver-data}
GEOSERVER_NODE_OPTS: "id:Tailormap Data Geoserver;background:#6236ff;color:white"
GEOSERVER_ADMIN_PASSWORD: ${GEOSERVER_ADMIN_PASSWORD:-geoserver}
GEODATA_PASSWORD: ${GEODATA_PASSWORD:-07d8313e-75b1-45}
GEOSERVER_CSRF_WHITELIST: ${GEOSERVER_CSRF_WHITELIST:-snapshot.tailormap.nl}
GEOSERVER_CSRF_DISABLED: ${GEOSERVER_CSRF_DISABLED:-false}
volumes:
- geoserver-data:${GEOSERVER_DATA_DIR:-/opt/geoserver-data}
ports:
- "${BIND_IP:-127.0.0.1}:8080:8080"
networks:
- tailormap-data
- tailormap-viewer
- traefik
labels:
traefik.enable: true
traefik.docker.network: traefik
traefik.http.routers.tailormap-data.rule: "Host(`${HOST:-snapshot.tailormap.nl}`) && PathPrefix(`/geoserver`)"
traefik.http.routers.tailormap-data.tls: "true"
traefik.http.routers.tailormap-data.tls.certresolver: "letsencrypt"
traefik.http.services.tailormap-data.loadbalancer.server.port: "8080"
# healthcheck:
# test: curl -f -u admin:$$GEOSERVER_ADMIN_PASSWORD -H "accept:application/json" http://localhost:8080/geoserver/rest/about/version || exit 1
# interval: 1m30s
# timeout: 10s
# retries: 3
# start_period: 1m
restart: unless-stopped