generated from VForWaTer/tool_template_python
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
54 lines (52 loc) · 1.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
services:
db:
image: postgis/postgis:15-3.4
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: metacatalog
expose:
- 5432
ports:
- 5433:5432
volumes:
- ./data/pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"]
interval: 50s
timeout: 10s
retries: 5
installer:
build:
context: .
dockerfile: Dockerfile
links:
- db
depends_on:
db:
condition: "service_healthy"
environment:
METACATALOG_URI: postgresql://postgres:postgres@db:5432/metacatalog
DATA_FILE_PATH: /data/raster
command: ["python", "/src/pg_init/init.py"]
volumes:
- ./in:/in
- ./out:/out
- ./data/raster:/data/raster
- ./init:/tool_init
loader:
build:
context: .
dockerfile: Dockerfile
links:
- db
depends_on:
installer:
condition: "service_completed_successfully"
environment:
METACATALOG_URI: postgresql://postgres:postgres@db:5432/metacatalog
command: ["echo", "The tool can be started using 'docker compose run --rm loader python run.py'"]
volumes:
- ./in:/in
- ./out:/out
- ./data/raster:/data/raster