Skip to content

Commit 9511d57

Browse files
committed
docker compose
1 parent cf6573b commit 9511d57

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: '3'
2+
3+
services:
4+
app-elasticsearch:
5+
container_name: stac-fastapi-es
6+
image: stac-utils/stac-fastapi-es
7+
restart: always
8+
build:
9+
context: .
10+
dockerfile: Dockerfile
11+
platform: linux/amd64
12+
environment:
13+
- APP_HOST=0.0.0.0
14+
- APP_PORT=8080
15+
- RELOAD=true
16+
- ENVIRONMENT=local
17+
- WEB_CONCURRENCY=10
18+
- ES_HOST=172.17.0.1
19+
- ES_PORT=9200
20+
- ES_USE_SSL=false
21+
- ES_VERIFY_CERTS=false
22+
ports:
23+
- "8080:8080"
24+
volumes:
25+
- ./stac_fastapi:/app/stac_fastapi
26+
- ./scripts:/app/scripts
27+
depends_on:
28+
- elasticsearch
29+
command:
30+
bash -c "./scripts/wait-for-it-es.sh es-container:9200 && python -m stac_fastapi.elasticsearch.app"
31+
32+
elasticsearch:
33+
container_name: es-container
34+
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-8.1.3}
35+
environment:
36+
ES_JAVA_OPTS: -Xms512m -Xmx1g
37+
volumes:
38+
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
39+
- ./elasticsearch/snapshots:/usr/share/elasticsearch/snapshots
40+
ports:
41+
- "9200:9200"
42+
43+
networks:
44+
default:
45+
name: stac-fastapi-network

0 commit comments

Comments
 (0)