forked from goat-community/data_preparation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·110 lines (102 loc) · 3.32 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
version: "3.9"
networks:
data_preparation_proxy:
name: data_preparation_proxy
volumes:
goat_data_preparation_data:
#3dcity_db:
services:
app:
image: ${DOCKER_ID}/${COMPOSE_PROJECT_NAME}:app-${PROJECT_VERSION}
build:
context: .
args:
INSTALL_DEV: ${INSTALL_DEV-true}
INSTALL_JUPYTER: ${INSTALL_JUPYTER-true}
container_name: ${COMPOSE_PROJECT_NAME}_app
hostname: ${COMPOSE_PROJECT_NAME}_app
env_file:
- .env
environment:
- POSTGRES_PASS=${POSTGRES_PASSWORD}
- PGPASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- PGUSER=${POSTGRES_USER}
- POSTGRES_DBNAME=goat
- PGDATABASE=goat
- PGHOST=${COMPOSE_PROJECT_NAME}_db
- DATABASE_URL=postgis://${POSTGRES_USER}:${POSTGRES_PASSWORD}@goat_db:5432/goat
- JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
- AWS_BUCKET_NAME=${AWS_BUCKET_NAME}
volumes:
- .:/app
networks:
data_preparation_proxy:
# Enable if R5 is running locally on the host machine
extra_hosts:
- "host_network:host-gateway"
db-vol-ownership:
image: ubuntu
user: "root"
group_add:
- '10000'
volumes:
- goat_data_preparation_data:/storage/data:rw
command: chown -R 10000:10000 /storage
db:
image: goatcommunity/postgres-data-preparation:latest
container_name: ${COMPOSE_PROJECT_NAME}_db
hostname: ${COMPOSE_PROJECT_NAME}_db
environment:
# DB_ADMIN IS "rds" (!cannot be changed!)
- DB_INSTANCE_NAME=${COMPOSE_PROJECT_NAME}_db
- DB_ADMIN_PASSWORD=${POSTGRES_PASSWORD}
- DISABLE_BACKUP=1
- DB_DATABASE_PREPARATION=${POSTGRES_DB}
- DB_USERNAME_PREPARATION=${POSTGRES_USER}
- DB_PASSWORD_PREPARATION=${POSTGRES_PASSWORD}
volumes:
- goat_data_preparation_data:/storage/data:rw
- ./src/data/input/gtfs:/tmp/gtfs:rw
ports:
- "${POSTGRES_OUTER_PORT}:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -h ${COMPOSE_PROJECT_NAME}_db" ]
interval: 10s
timeout: 5s
retries: 5
restart: on-failure
depends_on:
db-vol-ownership:
condition: service_completed_successfully
networks:
data_preparation_proxy:
# 3dcity:
# image: 3dcitydb/3dcitydb-pg:14-3.3-4.4.0
# container_name: ${COMPOSE_PROJECT_NAME}_3dcity
# hostname: ${COMPOSE_PROJECT_NAME}_3dcity
# command: postgres -c 'config_file=/etc/postgresql.conf'
# environment:
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD_3DCITY}
# - POSTGRES_USER=${POSTGRES_USER_3DCITY}
# - POSTGRES_DB=${POSTGRES_DB_3DCITY}
# - POSTGIS_SFCGAL_3DCITY=true
# - SRID=${SRID}
# - HEIGHT_EPSG=${HEIGHT_EPSG}
# - GMLSRSNAME=${GMLSRSNAME}
# healthcheck:
# test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER_3DCITY}" ]
# interval: 10s
# timeout: 5s
# retries: 5
# ports:
# - "${POSTGRES_OUTER_PORT_3DCITY}:5432"
# volumes:
# - 3dcity_db:/var/lib/postgresql
# - ${PWD}/postgresql.conf:/etc/postgresql.conf
# restart: on-failure
# networks:
# data_preparation_proxy: