-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
116 lines (102 loc) · 3.53 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
version: '3'
services:
postgres:
image: postgres:12.3-alpine
environment:
- POSTGRES_PASSWORD=default
- POSTGRES_DB=hs_data_services
volumes:
- data_services_volume:/var/lib/postgresql/data/
# ports:
# - 5432:5432 # Please don't open this port to the outside world.
networks:
- data_services_network
restart: unless-stopped
geoserver:
image: oscarfonts/geoserver:2.24.1
environment:
- CUSTOM_UID={{IRODS_ACCESS_UID}} # A user ID on the host with read permissions to the iRODS directory
- GEOSERVER_CSRF_WHITELIST={{HYDROSHARE_DOMAIN}} # e.g. hydroshare.org,hydroshare.io: https://docs.geoserver.org/latest/en/user/security/webadmin/csrf.html
- CATALINA_OPTS=-server -Djava.awt.headless=true -Xms2g -Xmx10g -XX:NewSize=48m -DGEOSERVER_DATA_DIR=/var/local/geoserver
# https://github.com/oscarfonts/docker-geoserver/blob/master/2.24.1/Dockerfile#L35-L37
# https://docs.geoserver.org/main/en/user/production/container.html
volumes:
- geoserver_volume:/var/local/geoserver
- ./conf/geoserver/geoserver.sh:/usr/local/bin/start.sh # Overwrite the default startup script to allow anonymous GET access
# must be kept in sync with GEOSERVER_DATA_DIR in local_settings.py
- /mnt/geoserver_resources:/geoserver_resources:ro
# - ./conf/geoserver/setenv.sh:/usr/local/tomcat/bin/setenv.sh # Mount custom JVM variables, disabled in favor of CATALINA_OPTS above
networks:
- data_services_network
restart: unless-stopped
redis:
image: redis:6.0.4-alpine
networks:
- data_services_network
restart: unless-stopped
flower:
image: mher/flower:0.9.5
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- FLOWER_PORT=8040
- FLOWER_URL_PREFIX=flower
networks:
- data_services_network
depends_on:
- redis
restart: unless-stopped
gunicorn:
build: .
command: /usr/bin/supervisord -c /home/dsuser/conf/gunicorn/gunicorn.conf
volumes:
- static_volume:/static # Static files will be stored in a docker volume.
networks:
- data_services_network
depends_on:
- postgres
restart: unless-stopped
celery-worker:
build: .
command: /usr/bin/supervisord -c /home/dsuser/conf/celery-worker/celery_worker.conf
networks:
- data_services_network
depends_on:
- redis
- postgres
volumes:
- /mnt/geoserver_resources:/geoserver_resources
restart: unless-stopped
celery-beat:
build: .
command: /usr/bin/supervisord -c /home/dsuser/conf/celery-beat/celery_beat.conf
networks:
- data_services_network
depends_on:
- redis
- celery-worker
- postgres
restart: unless-stopped
nginx:
image: nginx:1.19
ports:
- 80:80
- 443:443
volumes:
- ./conf/nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
- static_volume:/static # Static files will be stored in a docker volume.
#- /opt/hs-certs:/opt/hs-certs # Used to configure SSL if available.
- ./conf/nginx/custom_404.html:/usr/share/nginx/html/custom_404.html
networks:
- data_services_network
depends_on:
- gunicorn
- geoserver
- flower
restart: unless-stopped
networks:
data_services_network:
driver: bridge
volumes:
data_services_volume:
geoserver_volume:
static_volume: