-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
165 lines (163 loc) · 5.31 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
version: "3"
services:
postgresql:
build:
context: .
dockerfile: Dockerfile.db
environment:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- PGDATA=/var/lib/postgresql
- PGUSER=root
- PGPASSWORD=root
expose:
- "5432"
networks:
- db_private
volumes:
- var-lib-postgresql:/var/lib/postgresql:Z
worker:
build:
context: .
dockerfile: Dockerfile.worker
entrypoint:
- ./cavedb/scripts/docker-worker-entrypoint.sh
environment:
- CAVEDB_DATA_BASE_DIR=/usr/local/cavedbmanager-data
- CAVEDB_DEM_PATH=/usr/local/postgis-data-importer/download/us_wv/dem
- CAVEDB_GIS_DBNAME=wvgis
- CAVEDB_WORKER_MSG_DIR=/var/run/cavedb-worker
- DJANGO_SETTINGS_MODULE=cavedb.settings
# Uncomment the following if you would like to use the 2003 aerial imagery.
# This is the latest publicly available imagery available that is available
# for WV with the leaves off the trees. Requires downloading the GeoExpress
# Command Line Applications from
# https://www.lizardtech.com/gis-tools/tools-and-utilities
#- MRSID_DECODE_BINARY=/usr/local/cavedbmanager-data/GeoExpressCLUtils-9.5.0.4326-linux64/bin/mrsidgeodecode
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- PGHOST=postgresql
- PGPORT=5432
- PGDATABASE=cavedb
- PGUSER=root
- PGPASSWORD=root
- POSTGIS_IMPORTER_BASE_DIR=/usr/local/postgis-data-importer
- POSTGIS_IMPORTER_SAMPLE_PATCHFILE=sample-bulletin/postgis-data-importer-sample-bulletin.patch
- PYTHONPATH=/usr/local/cavedbmanager
networks:
- db_private
ulimits:
nofile: 20480
volumes:
- cavedb-worker:/var/run/cavedb-worker:z
- cavedbmanager-data:/usr/local/cavedbmanager-data:z
- postgis-data-importer-downloads:/usr/local/postgis-data-importer/download:z
web:
build:
context: .
dockerfile: Dockerfile.web
entrypoint:
- ./cavedb/scripts/docker-web-entrypoint.sh
environment:
# Separate multiple hosts with a :
- CAVEDB_ALLOWED_HOSTS=localhost
- CAVEDB_DATA_BASE_DIR=/usr/local/cavedbmanager-data
# Set this to 0 when running in production. Also set EMAIL_* settings below for error emails to
# the address specified in WEB_ADMIN_EMAIL.
- CAVEDB_DEBUG=1
- CAVEDB_GIS_DBNAME=wvgis
- CAVEDB_SECRET_KEY=FIXME_CHANGE_THIS_SECRET_KEY
- CAVEDB_SITE_HEADER=My Cave Database
- CAVEDB_WORKER_MSG_DIR=/var/run/cavedb-worker
- DJANGO_SETTINGS_MODULE=cavedb.settings
#- EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
#- EMAIL_HOST=hostname
#- EMAIL_PORT=587
#- EMAIL_HOST_USER=user
#- EMAIL_HOST_PASSWORD=pass
# A self signed certificate will be automatically generated for you if the SSL_* files below
# do not exist. Be sure to update the conf/nginx-app.conf file if you change these paths.
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- SSL_COMBINED_CERTS=/etc/cavedb-ssl/ssl-combined-certs.pem
- SSL_KEY=/etc/cavedb-ssl/ssl.key
- PGHOST=postgresql
- PGPORT=5432
- PGDATABASE=cavedb
- PGUSER=root
- PGPASSWORD=root
- PYTHONPATH=/usr/local/cavedbmanager
- WEB_ADMIN_FULLNAME=Your Name
# The WEB_ADMIN_USER and WEB_ADMIN_PASS variables are here for initial bootstrap
# of the project. Once you get it going, you should remove these and change your
# password.
- WEB_ADMIN_USER=admin
- WEB_ADMIN_PASS=password
networks:
- db_private
- web_public
ports:
- "8000:80"
- "8443:443"
volumes:
- cavedb-ssl:/etc/cavedb-ssl:z
- cavedb-worker:/var/run/cavedb-worker:z
- cavedbmanager-data:/usr/local/cavedbmanager-data:z
cron:
build:
context: .
dockerfile: Dockerfile.cron
environment:
- CAVEDB_WORKER_MSG_DIR=/var/run/cavedb-worker
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
networks:
- cron_private
volumes:
- cavedb-worker:/var/run/cavedb-worker:z
volumes:
var-lib-postgresql:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker-volumes/var-lib-postgresql
postgis-data-importer-downloads:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker-volumes/postgis-data-importer-downloads
cavedb-ssl:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker-volumes/cavedb-ssl
cavedb-worker:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker-volumes/cavedb-worker
cavedbmanager-data:
driver: local
driver_opts:
type: none
o: bind
device: ${PWD}/docker-volumes/cavedbmanager-data
networks:
web_public:
db_private:
# Note that by default the db_private network has access to the Internet. Once the initial
# sample data is downloaded, stop the docker-compose services, uncomment the internal flag
# below to increase the overall security of the application by not allowing the backend
# services to have access to the Internet.
#internal: true
cron_private:
internal: true