-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
196 lines (196 loc) · 5.82 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
version: '3.9'
services:
dbbackups:
depends_on:
postgis:
condition: service_healthy
environment:
- DUMPPREFIX=PG_db
- POSTGRES_USER=tagbase
- POSTGRES_PASS=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_HOST=postgis
- REMOVE_BEFORE=30
hostname: pg-backups
image: kartoza/pg-backup:15-3.3
labels:
"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "Docker PostGIS backup"
"docker_compose_diagram.icon": "docker"
links:
- postgis
networks:
- internal-network
volumes:
- ./dbbackups:/backups
restart: on-failure
docker-cron:
build:
context: ./services/docker-cron
depends_on:
postgis:
condition: service_healthy
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
labels:
"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "'metadata_types' and\n'observation_types' synchronization"
"docker_compose_diagram.icon": "python"
links:
- postgis
networks:
- internal-network
restart: unless-stopped
fswatch:
build:
context: ./services/fswatch
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
labels:
"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "Automatic file ingestion"
"docker_compose_diagram.icon": "go"
links:
- tagbase_server
networks:
- internal-network
restart: unless-stopped
volumes:
- ./staging_data:/usr/src/app/staging_data:ro
nginx:
build:
context: ./services/nginx
labels:
#"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "Reverse proxy \n and authentication."
"docker_compose_diagram.icon": "nginx"
links:
- pgadmin4
- tagbase_server
networks:
- internal-network
ports:
- 81:81
- 443:443
volumes:
- ./services/nginx/config/nginx.conf:/etc/nginx/nginx.conf
- ./services/nginx/proxy/:/usr/share/nginx/html/:ro
- ./services/nginx/ssl/cert.pem:/etc/nginx/certs/cert.pem
- ./services/nginx/ssl/key.pem:/etc/nginx/certs/key.pem
pgadmin4:
depends_on:
postgis:
condition: service_healthy
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
- PGADMIN_LISTEN_PORT=5434
expose:
- 5434
hostname: pgadmin4
image: dpage/pgadmin4:latest
labels:
"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "PostgreSQL administration"
"docker_compose_diagram.icon": "docker"
links:
- postgis
networks:
- internal-network
restart: unless-stopped
# postgres:
# build:
# context: ./services/postgres
# environment:
# - PGDATA=/var/lib/postgresql/data/pgdata
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# expose:
# - ${POSTGRES_PORT}
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -d tagbase -h postgres -U tagbase"]
# interval: 15s
# timeout: 5s
# retries: 5
# start_period: 15s
# hostname: postgres
# labels:
# "docker_compose_diagram.cluster": "Internal Network"
# "docker_compose_diagram.description": "Tagbase PostgreSQL server"
# networks:
# - internal-network
# ports:
# - ${POSTGRES_PORT}:${POSTGRES_PORT}
# restart: unless-stopped
# volumes:
# - ./postgres-data:/var/lib/postgresql/data
postgis:
environment:
- ALLOW_IP_RANGE=0.0.0.0/0
- PASSWORD_AUTHENTICATION=md5
- POSTGRES_DB=tagbase
- POSTGRES_PASS=${POSTGRES_PASSWORD}
- POSTGRES_USER=tagbase
- POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,postgis_raster,pgrouting
- SCRIPTS_LOCKFILE_DIR=/opt/data/
expose:
- ${POSTGRES_PORT}
healthcheck:
test: "PGPASSWORD=${POSTGRES_PASSWORD} pg_isready -d tagbase -h postgis -U tagbase"
interval: 15s
timeout: 5s
retries: 5
start_period: 15s
hostname: postgis
image: kartoza/postgis:15-3.3
labels:
"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "Tagbase PostGIS server"
networks:
- internal-network
ports:
- "5432:5432"
restart: unless-stopped
volumes:
- ./dbbackups:/backups
- ./postgis-data:/var/lib/postgresql
- ./services/postgis/tagbase_schema.sql:/docker-entrypoint-initdb.d/tagbase_schema.sql
- ./services/postgis/lockfiles:/opt/data/
slack_docker:
environment:
- webhook=${webhook}
image: ghcr.io/int128/slack-docker
labels:
#"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "Docker events management"
"docker_compose_diagram.icon": "docker"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
tagbase_server:
build:
context: ./tagbase_server
depends_on:
postgis:
condition: service_healthy
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}
expose:
- 5433
hostname: tagbase_server
labels:
"docker_compose_diagram.cluster": "Internal Network"
"docker_compose_diagram.description": "tagbase-server tag \ningestion and administration"
"docker_compose_diagram.icon": "flask"
links:
- postgis
networks:
- internal-network
restart: unless-stopped
volumes:
- ./logs:/usr/src/app/logs
networks:
internal-network: