From 79259eb856ea2847a61c44dee4eb03f557a7e4f1 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sun, 10 Oct 2021 14:42:40 +0300 Subject: Merges Dockerfiles Merges the normal dockerfile with the static build one to reduce duplication. Signed-off-by: Hassan Abouelela --- static-builds/Dockerfile | 28 ---------------------------- static-builds/README.md | 2 +- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 static-builds/Dockerfile (limited to 'static-builds') diff --git a/static-builds/Dockerfile b/static-builds/Dockerfile deleted file mode 100644 index a70165a0..00000000 --- a/static-builds/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Build a static preview of the site -FROM --platform=linux/amd64 python:3.9-slim-buster - -# Allow service to handle stops gracefully -STOPSIGNAL SIGQUIT - -# Set pip to have cleaner logs and no saved cache -ENV PIP_NO_CACHE_DIR=false \ - POETRY_VIRTUALENVS_CREATE=false - -# Install poetry -RUN pip install -U poetry - -# Copy the project files into working directory -WORKDIR /app - -# Install project dependencies -COPY pyproject.toml poetry.lock ./ -RUN poetry install --no-dev - -ARG git_sha="development" -ENV GIT_SHA=$git_sha -ENV PARENT_HOST=replace_me.host - -# Copy the source code in last to optimize rebuilding the image -COPY . . - -RUN SECRET_KEY=dummy_value python manage.py distill-local build --traceback --force --collectstatic diff --git a/static-builds/README.md b/static-builds/README.md index ee2c0910..fe24df07 100644 --- a/static-builds/README.md +++ b/static-builds/README.md @@ -21,7 +21,7 @@ python -m pip install httpx==0.19.0 python manage.py distill-local build --traceback --force --collectstatic ``` -Alternatively, you can use the [Dockerfile](./Dockerfile) in this folder. +Alternatively, you can use the [Dockerfile](/Dockerfile) and extract the build. Both output their builds to a `build/` directory. -- cgit v1.2.3