-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.test.yml
87 lines (86 loc) · 2.37 KB
/
docker-compose.test.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
---
# TEST compose file for continuous services.
version: "3.8"
services:
# Database for local development
db:
image: timescale/timescaledb-ha:pg14.4-ts2.7.2-p0
restart: unless-stopped
env_file: .env
ports:
- 127.0.0.1:${POSTGRES_HOST_PORT}:5432
environment:
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./db/sql:/docker-entrypoint-initdb.d:ro
# Persistent storage
- ./analytics-data:/var/lib/postgresql/data:z
healthcheck:
test: ["CMD", "pg_isready", "-q", "-U", "${POSTGRES_USER}"]
interval: 5s
start_period: 5s
timeout: 20s
retries: 3
api:
image: hfp-analytics/api:latest
build:
context: ./python
dockerfile: Dockerfile.api_local
depends_on:
db:
condition: service_healthy
ports:
- "127.0.0.1:7071:8000"
env_file: .env
working_dir: /code
command: uvicorn api.main:app --host 0.0.0.0 --reload
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./python/api:/code/api:ro
- ./python/common:/code/common/:ro
- ./python/host.json:/code/host.json:ro
- ./python/requirements.txt:/code/requirements.txt:ro
restart: on-failure
importer:
image: hfp-analytics/importer:latest
build:
context: ./python
dockerfile: Dockerfile.importer_local
ports:
- "127.0.0.1:7072:80"
env_file: .env
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./python/analyzer:/home/site/wwwroot/analyzer:ro
- ./python/importer:/home/site/wwwroot/importer:ro
- ./python/common:/home/site/wwwroot/common:ro
- ./python/host.json:/home/site/wwwroot/host.json:ro
- ./python/requirements.txt:/home/site/wwwroot/requirements.txt:ro
restart: on-failure
#worker:
# image: stopcorr/stopcorr-python:latest
# build: ./python
# depends_on:
# db:
# condition: service_healthy
# restart: "no"
# env_file: .env
# volumes:
# - ./python/src:/code:ro
# - ./qgis/out:/qgis/out:ro
# - ./results:/results
# command: python -c "print('worker OK')"
#fileserver:
# image: stopcorr/stopcorr-python:latest
# restart: unless-stopped
# env_file: .env
# ports:
# - ${FILESERVER_HOST_PORT}:8080
# volumes:
# - ./results:/results:ro
# command: python -m http.server 8080 --directory /results
networks:
default:
name: hfp_analytics_nw