elo-rezept-rechner/Dockerfile
moerp 443eb9ef00
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix
2024-02-01 16:48:54 +01:00

23 lines
553 B
Docker

FROM python:3.12-alpine3.19
ARG APP_DIR="/opt/app"
ARG VERSION_ID1="x"
ARG VERSION_ID2="alpha"
COPY ./src/ ${APP_DIR}/
COPY start.sh ${APP_DIR}/
WORKDIR ${APP_DIR}
RUN \
apk add --no-cache build-base libpq-dev && \
pip install -r requirements.txt && \
if [ "${VERSION_ID2}" != "" ]; then VERSION_ID=${VERSION_ID2}; else VERSION_ID=${VERSION_ID1}; fi && \
sed -i -e 's/VERSION_ID/'$VERSION_ID'/' ${APP_DIR}/templates/index.html \
sed -i -e 's/VERSION_ID/'"$VERSION_ID"'/' ${APP_DIR}/templates/nutrition.html
EXPOSE 8080
CMD "./start.sh"