-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (92 loc) · 2.48 KB
/
docker-compose.yml
File metadata and controls
98 lines (92 loc) · 2.48 KB
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
services:
app:
image: stac-utils/stac-fastapi-pgstac
build: .
environment:
- APP_HOST=0.0.0.0
- APP_PORT=8082
- RELOAD=true
- ENVIRONMENT=local
- PGUSER=username
- PGPASSWORD=password
- PGDATABASE=postgis
- PGHOST=database
- PGPORT=5432
- WEB_CONCURRENCY=10
- VSI_CACHE=TRUE
- GDAL_HTTP_MERGE_CONSECUTIVE_RANGES=YES
- GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=1
- USE_API_HYDRATE=${USE_API_HYDRATE:-false}
- ENABLE_TRANSACTIONS_EXTENSIONS=TRUE
ports:
- "8082:8082"
depends_on:
- database
command: bash -c "scripts/wait-for-it.sh database:5432 && python -m stac_fastapi.pgstac.app"
develop:
watch:
- action: rebuild
path: ./stac_fastapi/pgstac
tests:
image: stac-utils/stac-fastapi-pgstac-test
build:
context: .
dockerfile: Dockerfile.tests
environment:
- ENVIRONMENT=local
- DB_MIN_CONN_SIZE=1
- DB_MAX_CONN_SIZE=1
- USE_API_HYDRATE=${USE_API_HYDRATE:-false}
command: bash -c "python -m pytest -s -vv"
database:
image: ghcr.io/stac-utils/pgstac:v0.9.8
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgis
- PGUSER=username
- PGPASSWORD=password
- PGDATABASE=postgis
ports:
- "5439:5432"
command: postgres -N 500
# Load joplin demo dataset into the PGStac Application
loadjoplin:
image: stac-utils/stac-fastapi-pgstac
environment:
- ENVIRONMENT=development
volumes:
- ./testdata:/tmp/testdata
- ./scripts:/tmp/scripts
command: >
/bin/sh -c "
scripts/wait-for-it.sh -t 60 app:8082 &&
python -m pip install pip -U &&
python -m pip install requests &&
python /tmp/scripts/ingest_joplin.py http://app:8082
"
depends_on:
- database
- app
nginx:
image: nginx
ports:
- ${STAC_FASTAPI_NGINX_PORT:-8080}:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
- app-nginx
command: [ "nginx-debug", "-g", "daemon off;" ]
app-nginx:
extends:
service: app
command: >
bash -c "
scripts/wait-for-it.sh database:5432 &&
uvicorn stac_fastapi.pgstac.app:app --host 0.0.0.0 --port 8082 --proxy-headers --forwarded-allow-ips=* --root-path=/api/v1/pgstac
"
networks:
default:
name: stac-fastapi-network