-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (65 loc) · 1.77 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
version: '3.8'
volumes:
postgis_vol:
geoserver_vol:
services:
postgis:
# Database to store all geospatial data
image: postgis/postgis
container_name: postgis_carbon_neutral
restart: always
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- postgis_vol:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: pg_isready -h 127.0.0.1 -U $POSTGRES_USER -d $POSTGRES_DB
geoserver:
# Serves geospatial web data through interactions with files and database
image: docker.osgeo.org/geoserver:2.21.2
container_name: geoserver_carbon_neutral
volumes:
- geoserver_vol:/opt/geoserver_data
depends_on:
- postgis
environment:
- SKIP_DEMO_DATA=true
- CORS_ENABLED=true
ports:
- "${GEOSERVER_PORT}:8080"
restart: always
healthcheck:
test: curl --fail -s http://localhost:8080/geoserver || exit 1
interval: 5s
timeout: 3s
retries: 5
www:
# Webserver to visualise and interact with the data
image: lparkinson/www-co2-sa1:latest
build:
context: ./www
container_name: www_digital_twin
environment:
- VUE_APP_CESIUM_ACCESS_TOKEN=$CESIUM_ACCESS_TOKEN
- VUE_APP_GEOSERVER_HOST=$GEOSERVER_HOST
- VUE_APP_GEOSERVER_PORT=$GEOSERVER_PORT
ports:
- "${WWW_PORT}:80"
restart: always
initialise_db:
image: lparkinson/initialise-db-co2-sa1:latest
build:
context: initialise_db
container_name: initialise_db_carbon_neutral
env_file:
- .env
- .env.docker-override
depends_on:
postgis:
condition: service_healthy
geoserver:
condition: service_healthy