diff options
| author | 2024-08-19 02:01:41 +0100 | |
|---|---|---|
| committer | 2024-08-19 02:01:41 +0100 | |
| commit | d5e44770c282221d80955a68c27965e37f49762f (patch) | |
| tree | e90257aeb0ecd8d51e3556a38eba6eb2d4971404 | |
| parent | Correct the actions of the weak and feeble (diff) | |
Update Dockerfile with build-time optimisations
| -rw-r--r-- | thallium-backend/Dockerfile | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/thallium-backend/Dockerfile b/thallium-backend/Dockerfile index 0710893..c448b0a 100644 --- a/thallium-backend/Dockerfile +++ b/thallium-backend/Dockerfile @@ -1,9 +1,5 @@ FROM python:3.12-slim -# Define Git SHA build argument for sentry -ARG git_sha="development" -ENV GIT_SHA=$git_sha - RUN apt update -y \ && apt install -y curl \ && rm -rf /var/lib/apt/lists/* @@ -13,10 +9,13 @@ WORKDIR /thallium COPY requirements.txt ./ RUN pip install -r requirements.txt -# Copy the source code in last to optimize rebuilding the image COPY . . HEALTHCHECK --start-period=5s --interval=30s --timeout=1s CMD curl http://localhost/heartbeat || exit 1 +# Define Git SHA build argument for sentry +ARG git_sha="development" +ENV GIT_SHA=$git_sha + ENTRYPOINT ["/bin/bash", "-c"] CMD ["alembic upgrade head && uvicorn src.app:fastapi_app --host 0.0.0.0 --port 8000 --no-server-header"] |