refactor: format api container file

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2299>
environments/review-docs-poetr-umn39l/deployments/16928
jo 2022-12-19 21:49:13 +01:00 zatwierdzone przez Marge
rodzic 6528039e95
commit 65df7bf7a4
2 zmienionych plików z 12 dodań i 7 usunięć

Wyświetl plik

@ -4,11 +4,17 @@ FROM alpine:3.17 as pre-build
# dependencies. This is only required until alpine 3.16 is released, since this
# allows us to install poetry as package.
RUN apk add --no-cache python3 py3-cryptography py3-pip poetry
COPY pyproject.toml poetry.lock /
RUN poetry export --without-hashes > requirements.txt
RUN poetry export --with dev --without-hashes > dev-requirements.txt
RUN set -eux; \
apk add --no-cache \
poetry \
py3-cryptography \
py3-pip \
python3
COPY pyproject.toml poetry.lock /
RUN set -eux; \
poetry export --without-hashes > requirements.txt; \
poetry export --without-hashes --with dev > dev-requirements.txt;
FROM alpine:3.17 as builder
@ -40,9 +46,8 @@ RUN set -eux; \
py3-watchfiles=0.18.1-r0 \
python3-dev
# create virtual env for next stage
# Create virtual env
RUN python3 -m venv --system-site-packages /venv
# emulate activation by prefixing PATH
ENV PATH="/venv/bin:/root/.local/bin:$PATH" VIRTUAL_ENV=/venv
COPY --from=pre-build /requirements.txt /requirements.txt
@ -100,7 +105,6 @@ RUN set -eux; \
python3
COPY --from=builder /venv /venv
# emulate activation by prefixing PATH
ENV PATH="/venv/bin:$PATH"
COPY . /app

Wyświetl plik

@ -0,0 +1 @@
Format api container file