Collect staticfiles during image build
This commit is contained in:
parent
a46c2868c2
commit
ecc2e301b7
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,9 @@ RUN python -m venv --copies /app/venv \
|
|||
&& . /app/venv/bin/activate \
|
||||
&& poetry install $POETRY_OPTIONS
|
||||
|
||||
ENV PATH /app/venv/bin:$PATH
|
||||
COPY src ./src/
|
||||
RUN python ./src/manage.py collectstatic --no-input
|
||||
|
||||
## Get git versions
|
||||
FROM alpine/git AS git
|
||||
|
@ -46,6 +49,7 @@ COPY LICENSE pyproject.toml ./
|
|||
COPY docker ./docker/
|
||||
COPY src ./src/
|
||||
COPY --from=git /version /app/.version
|
||||
COPY --from=venv /app/src/staticfiles /app/src/staticfiles/
|
||||
|
||||
ENV SECRET_KEY "changeme"
|
||||
ENV DEBUG "false"
|
||||
|
|
Reference in a new issue