TelegramAktienBot/api/Dockerfile

29 lines
670 B
Docker
Raw Normal View History

FROM python:3.10-alpine
2022-04-04 13:51:43 +00:00
# Change the working directory to the project root
WORKDIR /srv/flask_app
2022-04-04 13:51:43 +00:00
# Install dependencies
2022-03-10 07:41:36 +00:00
RUN apk add nginx build-base libffi-dev curl uwsgi
2022-04-04 13:51:43 +00:00
# Install python dependencies
COPY api/requirements.txt /srv/flask_app/
RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-location
2022-04-04 13:51:43 +00:00
# Copy the app
COPY api /srv/flask_app
COPY api/deploy/nginx.conf /etc/nginx
2022-04-04 13:51:43 +00:00
# Change file permissions
RUN chmod +x ./deploy/start.sh
RUN chmod +x ./deploy/healthcheck.sh
2022-04-04 13:51:43 +00:00
# Set healthcheck
HEALTHCHECK --interval=15s --timeout=2s CMD ["./deploy/healthcheck.sh"]
2022-04-04 13:51:43 +00:00
# Expose webserver port
EXPOSE 80
2022-04-04 13:51:43 +00:00
# Run the app
2022-03-10 07:41:36 +00:00
CMD ["./deploy/start.sh"]