2022-03-08 14:19:19 +00:00
|
|
|
FROM python:3.10-alpine
|
|
|
|
|
|
|
|
WORKDIR /srv/flask_app
|
2022-03-10 07:41:36 +00:00
|
|
|
RUN apk add nginx build-base libffi-dev curl uwsgi
|
2022-03-08 14:19:19 +00:00
|
|
|
|
2022-03-12 19:05:46 +00:00
|
|
|
COPY webservice/requirements.txt /srv/flask_app/
|
2022-03-08 14:19:19 +00:00
|
|
|
|
|
|
|
RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-location
|
|
|
|
|
2022-03-12 19:07:32 +00:00
|
|
|
COPY . /srv/flask_app
|
|
|
|
COPY ./deploy/nginx.conf /etc/nginx
|
2022-03-08 14:19:19 +00:00
|
|
|
RUN chmod +x ./deploy/start.sh
|
|
|
|
RUN chmod +x ./deploy/healthcheck.sh
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=15s --timeout=2s CMD ["./deploy/healthcheck.sh"]
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
2022-03-10 07:41:36 +00:00
|
|
|
CMD ["./deploy/start.sh"]
|