Docker stuff
This commit is contained in:
parent
9b65eeee85
commit
f96da3f8d4
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user