Skip to content

Commit 990b2af

Browse files
fix: add scripts to docker image (#325)
* fix: add scripts to docker image * Update Dockerfile to copy wait-for-it.sh script * update docker-compose * update other apps --------- Co-authored-by: vincentsarago <[email protected]>
1 parent cc723ee commit 990b2af

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN python -m pip install -U pip
1919
WORKDIR /app
2020

2121
COPY stac_fastapi/ stac_fastapi/
22+
COPY scripts/wait-for-it.sh scripts/wait-for-it.sh
2223
COPY pyproject.toml pyproject.toml
2324
COPY README.md README.md
2425

docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ services:
2222
- ENABLE_TRANSACTIONS_EXTENSIONS=TRUE
2323
ports:
2424
- "8082:8082"
25-
volumes:
26-
- ./scripts:/tmp/scripts
2725
depends_on:
2826
- database
29-
command: bash -c "/tmp/scripts/wait-for-it.sh database:5432 && python -m stac_fastapi.pgstac.app"
27+
command: bash -c "scripts/wait-for-it.sh database:5432 && python -m stac_fastapi.pgstac.app"
3028
develop:
3129
watch:
3230
- action: rebuild
@@ -67,7 +65,7 @@ services:
6765
- ./scripts:/tmp/scripts
6866
command: >
6967
/bin/sh -c "
70-
/tmp/scripts/wait-for-it.sh -t 60 app:8082 &&
68+
scripts/wait-for-it.sh -t 60 app:8082 &&
7169
python -m pip install pip -U &&
7270
python -m pip install requests &&
7371
python /tmp/scripts/ingest_joplin.py http://app:8082
@@ -91,7 +89,7 @@ services:
9189
service: app
9290
command: >
9391
bash -c "
94-
/tmp/scripts/wait-for-it.sh database:5432 &&
92+
scripts/wait-for-it.sh database:5432 &&
9593
uvicorn stac_fastapi.pgstac.app:app --host 0.0.0.0 --port 8082 --proxy-headers --forwarded-allow-ips=* --root-path=/api/v1/pgstac
9694
"
9795

0 commit comments

Comments
 (0)