diff --git a/docker-compose.custom.yml b/docker-compose.custom.yml index 09880d1c..410802a5 100644 --- a/docker-compose.custom.yml +++ b/docker-compose.custom.yml @@ -53,8 +53,9 @@ services: - database - raster command: - bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" + bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start-reload.sh" volumes: + - ./runtime/eoapi/stac:/app/stac - ./dockerfiles/scripts:/tmp/scripts raster: @@ -109,8 +110,9 @@ services: depends_on: - database command: - bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" + bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start-reload.sh" volumes: + - ./runtime/eoapi/raster:/app/raster - ./dockerfiles/scripts:/tmp/scripts vector: @@ -141,10 +143,11 @@ services: - DB_MIN_CONN_SIZE=1 - DB_MAX_CONN_SIZE=10 command: - bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start.sh" + bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && /start-reload.sh" depends_on: - database volumes: + - ./runtime/eoapi/vector:/app/vector - ./dockerfiles/scripts:/tmp/scripts stac-uvicorn: @@ -181,8 +184,9 @@ services: - database - raster-uvicorn command: - bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && uvicorn eoapi.stac.app:app --host 0.0.0.0 --port 8081" + bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && uvicorn eoapi.stac.app:app --host 0.0.0.0 --port 8081 --reload" volumes: + - ./runtime/eoapi/stac:/app/stac - ./dockerfiles/scripts:/tmp/scripts raster-uvicorn: @@ -229,8 +233,9 @@ services: depends_on: - database command: - bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && uvicorn eoapi.raster.app:app --host 0.0.0.0 --port 8082" + bash -c "bash /tmp/scripts/wait-for-it.sh -t 120 -h database -p 5432 && uvicorn eoapi.raster.app:app --host 0.0.0.0 --port 8082 --reload" volumes: + - ./runtime/eoapi/raster:/app/raster - ./dockerfiles/scripts:/tmp/scripts vector-uvicorn: @@ -259,6 +264,7 @@ services: depends_on: - database volumes: + - ./runtime/eoapi/vector:/app/vector - ./dockerfiles/scripts:/tmp/scripts database: diff --git a/dockerfiles/Dockerfile.raster b/dockerfiles/Dockerfile.raster index 926425c3..024bc7ae 100644 --- a/dockerfiles/Dockerfile.raster +++ b/dockerfiles/Dockerfile.raster @@ -6,9 +6,8 @@ ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt RUN pip install psycopg[binary,pool] -COPY runtime/eoapi/raster /tmp/raster -RUN pip install /tmp/raster -RUN rm -rf /tmp/raster +COPY runtime/eoapi/raster /app/raster +RUN pip install -e /app/raster ENV MODULE_NAME eoapi.raster.app ENV VARIABLE_NAME app diff --git a/dockerfiles/Dockerfile.raster-uvicorn b/dockerfiles/Dockerfile.raster-uvicorn index e5e00c13..e98725cc 100644 --- a/dockerfiles/Dockerfile.raster-uvicorn +++ b/dockerfiles/Dockerfile.raster-uvicorn @@ -17,9 +17,8 @@ RUN python -m pip install pip -U RUN python -m pip install psycopg[binary,pool] -COPY runtime/eoapi/raster /tmp/raster -RUN python -m pip install /tmp/raster uvicorn -RUN rm -rf /tmp/raster +COPY runtime/eoapi/raster /app/raster +RUN pip install -e /app/raster ENV HOST 0.0.0.0 ENV PORT 80 diff --git a/dockerfiles/Dockerfile.stac b/dockerfiles/Dockerfile.stac index 287f9be2..b95f4052 100644 --- a/dockerfiles/Dockerfile.stac +++ b/dockerfiles/Dockerfile.stac @@ -4,9 +4,8 @@ FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION} ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt -COPY runtime/eoapi/stac /tmp/stac -RUN pip install /tmp/stac -RUN rm -rf /tmp/stac +COPY runtime/eoapi/stac /app/stac +RUN pip install -e /app/stac ENV MODULE_NAME eoapi.stac.app ENV VARIABLE_NAME app diff --git a/dockerfiles/Dockerfile.stac-uvicorn b/dockerfiles/Dockerfile.stac-uvicorn index 0f57d42d..b5ba7848 100644 --- a/dockerfiles/Dockerfile.stac-uvicorn +++ b/dockerfiles/Dockerfile.stac-uvicorn @@ -15,9 +15,9 @@ ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt RUN python -m pip install pip -U -COPY runtime/eoapi/stac /tmp/stac -RUN python -m pip install /tmp/stac uvicorn -RUN rm -rf /tmp/stac + +COPY runtime/eoapi/stac /app/stac +RUN pip install -e /app/stac ENV HOST 0.0.0.0 ENV PORT 80 diff --git a/dockerfiles/Dockerfile.vector b/dockerfiles/Dockerfile.vector index f49c462c..c8a28ce6 100644 --- a/dockerfiles/Dockerfile.vector +++ b/dockerfiles/Dockerfile.vector @@ -2,9 +2,8 @@ ARG PYTHON_VERSION=3.11 FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION} -COPY runtime/eoapi/vector /tmp/vector -RUN pip install /tmp/vector -RUN rm -rf /tmp/vector +COPY runtime/eoapi/vector /app/vector +RUN pip install -e /app/vector ENV MODULE_NAME eoapi.vector.app ENV VARIABLE_NAME app diff --git a/dockerfiles/Dockerfile.vector-uvicorn b/dockerfiles/Dockerfile.vector-uvicorn index 479ad738..af45b2cf 100644 --- a/dockerfiles/Dockerfile.vector-uvicorn +++ b/dockerfiles/Dockerfile.vector-uvicorn @@ -15,9 +15,8 @@ ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt RUN python -m pip install pip -U -COPY runtime/eoapi/vector /tmp/vector -RUN python -m pip install /tmp/vector uvicorn -RUN rm -rf /tmp/vector +COPY runtime/eoapi/vector /app/vector +RUN pip install -e /app/vector ENV HOST 0.0.0.0 ENV PORT 80