Reorganize repos
This commit is contained in:
36
docker/Dockerfile
Normal file
36
docker/Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
# syntax = docker/dockerfile:1.2
|
||||
FROM python:3.12.2-alpine3.19
|
||||
|
||||
ARG APP_VERSION
|
||||
ARG APP_SHA
|
||||
ARG BUILD_DATE
|
||||
|
||||
ENV APP_VERSION=${APP_VERSION:-alpha0}
|
||||
ENV APP_SHA=${APP_SHA:-000000}
|
||||
# useful in case we want to run in debug mode
|
||||
ENV FLASK_APP /hsman/wsgi.py
|
||||
ENV FLASK_ENV production
|
||||
|
||||
RUN apk --update --no-cache add \
|
||||
bash \
|
||||
build-base \
|
||||
libffi-dev \
|
||||
curl && \
|
||||
chmod g+w /run && \
|
||||
pip install poetry gunicorn
|
||||
|
||||
COPY . /hsman
|
||||
|
||||
RUN cd hsman && \
|
||||
poetry install && \
|
||||
poetry export | pip install -r /dev/stdin
|
||||
|
||||
|
||||
WORKDIR /hsman
|
||||
|
||||
HEALTHCHECK --interval=20s --timeout=3s CMD curl -I -s -o /dev/null localhost:5000/health || exit 1
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
# exectute start up script
|
||||
ENTRYPOINT ["/hsman/docker/entrypoint.sh"]
|
Reference in New Issue
Block a user