This repository has been archived by the owner on Oct 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
111 lines (104 loc) · 3.11 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
#
# Copyright (c) 2020, 2021, 2022, 2023, 2024 Humanitarian OpenStreetMap Team
#
# This file is part of Underpass.
#
# Underpass is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Underpass is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Underpass. If not, see <https://www.gnu.org/licenses/>.
#
version: "3"
services:
# Database for Underpass
underpass_db:
image: postgis/postgis:${UNDERPASS_DB_TAG:-15-3.3-alpine}
container_name: "underpass_db"
ports:
- "${DB_PORT:-5439}:5432"
environment:
- POSTGRES_DB=underpass
- POSTGRES_USER=underpass
- POSTGRES_PASSWORD=underpass
volumes:
- ./data:/var/lib/postgresql/data
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
networks:
internal:
# Un-comment for starting a second database
# Database for OSM Raw Data
# osm_db:
# image: postgis/postgis:${OSM_DB_TAG:-15-3.3-alpine}
# container_name: "osm_db"
# ports:
# - "${DB_PORT:-5440}:5432"
# environment:
# - POSTGRES_DB=osm
# - POSTGRES_USER=underpass
# - POSTGRES_PASSWORD=underpass
# volumes:
# - ./data_osm:/var/lib/postgresql/data
# restart: on-failure
# logging:
# driver: "json-file"
# options:
# max-size: "200k"
# max-file: "10"
# networks:
# internal:
# Underpass
underpass:
image: "ghcr.io/hotosm/underpass:${TAG_OVERRIDE:-debug}"
container_name: "underpass"
build:
context: .
dockerfile: docker/underpass.dockerfile
target: ${TAG_OVERRIDE:-debug}
args:
APP_VERSION: ${APP_VERSION:-debug}
depends_on: [underpass_db]
environment:
- REPLICATOR_UNDERPASS_DB_URL=underpass:underpass@underpass_db/underpass
- REPLICATOR_OSM_DB_URL=underpass:underpass@underpass_db/underpass
command: tail -f /dev/null
# Un-comment for debugging
# volumes:
# - ${PWD}:/code
# - ./replication:/usr/local/lib/underpass/data/replication
networks:
internal:
# Underpass API
api:
image: "ghcr.io/hotosm/underpass/api:${APP_VERSION:-debug}"
container_name: "underpass_api"
build:
context: .
dockerfile: docker/underpass-api.dockerfile
target: debug
args:
APP_VERSION: ${APP_VERSION:-debug}
depends_on: [underpass]
volumes:
- ./python:/code
ports:
- "${API_PORT:-8000}:8000"
networks:
internal:
environment:
- UNDERPASS_API_DB=postgresql://underpass:underpass@underpass/underpass
- UNDERPASS_API_OSM_DB=postgresql://underpass:underpass@underpass/underpass
networks:
internal: