elo-rezept-rechner/Dockerfile
Wolfgang Hottgenroth d3e624b9ce
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
new base image
2025-01-17 13:31:15 +01:00

24 lines
593 B
Docker

FROM python:3.12-alpine3.21
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 npm && \
pip install --upgrade pip && \
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"