forked from stac-utils/stac-fastapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
128 lines (122 loc) · 3.42 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
version: '3'
services:
app-sqlalchemy:
container_name: stac-fastapi-sqlalchemy
image: stac-utils/stac-fastapi
build:
context: .
dockerfile: Dockerfile
platform: linux/amd64
environment:
- APP_HOST=0.0.0.0
- APP_PORT=8081
- RELOAD=false
- ENVIRONMENT=local
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=postgis
- POSTGRES_HOST_READER=database
- POSTGRES_HOST_WRITER=database
- POSTGRES_PORT=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
ports:
- "8081:8081"
volumes:
- ./stac_fastapi:/app/stac_fastapi
- ./scripts:/app/scripts
depends_on:
- database
command:
bash -c "./scripts/wait-for-it.sh database:5432 && python -m stac_fastapi.sqlalchemy.app"
app-pgstac:
container_name: stac-fastapi-pgstac
image: stac-utils/stac-fastapi
build:
context: .
dockerfile: Dockerfile
platform: linux/amd64
environment:
- APP_HOST=0.0.0.0
- APP_PORT=8082
- RELOAD=false
- ENVIRONMENT=local
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=postgis
- POSTGRES_HOST_READER=database
- POSTGRES_HOST_WRITER=database
- POSTGRES_PORT=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
ports:
- "8082:8082"
volumes:
- ./stac_fastapi:/app/stac_fastapi
- ./scripts:/app/scripts
depends_on:
- database
command:
bash -c "./scripts/wait-for-it.sh database:5432 && python -m stac_fastapi.pgstac.app"
database:
container_name: stac-db
image: ghcr.io/stac-utils/pgstac:v0.3.4
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgis
ports:
- "5439:5432"
command: postgres -N 500
# Load joplin demo dataset into the SQLAlchemy Application
loadjoplin-sqlalchemy:
image: stac-utils/stac-fastapi
environment:
- ENVIRONMENT=development
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=postgis
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
volumes:
- ./stac_fastapi:/app/stac_fastapi
- ./scripts:/app/scripts
command: >
bash -c "./scripts/wait-for-it.sh app-sqlalchemy:8081 && cd stac_fastapi/sqlalchemy && alembic upgrade head && python /app/scripts/ingest_joplin.py http://app-sqlalchemy:8081"
depends_on:
- database
- app-sqlalchemy
# Load joplin demo dataset into the PGStac Application
loadjoplin-pgstac:
image: stac-utils/stac-fastapi
environment:
- ENVIRONMENT=development
- POSTGRES_USER=username
- POSTGRES_PASS=password
- POSTGRES_DBNAME=postgis
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
volumes:
- ./stac_fastapi:/app/stac_fastapi
- ./scripts:/app/scripts
command:
- "./scripts/wait-for-it.sh"
- "app-pgstac:8082"
- "--"
- "python"
- "/app/scripts/ingest_joplin.py"
- "http://app-pgstac:8082"
depends_on:
- database
- app-pgstac
networks:
default:
name: stac-fastapi-network