-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (25 loc) · 1.14 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM python:3.12.1-slim-bookworm
# https://www.freecodecamp.org/news/how-to-dockerize-a-flask-app/
# https://smirnov-am.github.io/running-flask-in-production-with-docker/
# https://blog.logrocket.com/build-deploy-flask-app-using-docker/
# Todo Re-enable database support.
# I will need to create the passwords table before this works, also I didn't figure out how to do
# mariadb in the container, it kept giving errors but it started up.
# I got the container working by disabling the database connection, I think it's just not loading the values from
# the .env file or it needs the table created.
WORKDIR /app
# https://askubuntu.com/questions/1438002/mariadb-connector-c-is-not-installed
# This fixes that error with mysql
# RUN apt-get update && \
# apt-get install -y --no-install-recommends libmariadb3 libmariadb-dev
# Install pip requirements
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
# RUN chmod +x ./run.sh
EXPOSE 81
# I never did get these working.
# ENTRYPOINT ["./entrypoint.sh"]
# CMD ["./run.sh"]
# Moved to compose
#CMD [ "python3", "-m", "flask", "run", "--host=0.0.0.0", "--port=8000"]