2023-12-21 17:51:49 +01:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
|
|
FROM python:3.11.6-alpine3.18
|
|
|
|
|
2023-12-21 18:44:01 +01:00
|
|
|
RUN addgroup -S td && adduser -S td -G td
|
|
|
|
|
2023-12-21 17:51:49 +01:00
|
|
|
WORKDIR /txtdiary
|
2023-12-22 05:10:20 +01:00
|
|
|
RUN mkdir ./data && chown td:td ./data
|
2023-12-21 17:51:49 +01:00
|
|
|
|
2023-12-21 18:44:01 +01:00
|
|
|
COPY LICENSE .
|
|
|
|
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN pip install pyuwsgi -r requirements.txt
|
2023-12-21 17:51:49 +01:00
|
|
|
|
2023-12-21 18:44:01 +01:00
|
|
|
COPY ./src ./app
|
2023-12-21 17:51:49 +01:00
|
|
|
|
2023-12-21 18:58:52 +01:00
|
|
|
USER td
|
2023-12-21 17:51:49 +01:00
|
|
|
|
2023-12-22 05:10:20 +01:00
|
|
|
|
|
|
|
CMD [ "uwsgi", \
|
|
|
|
"--http", "0.0.0.0:80", "-M", \
|
|
|
|
"-w", "app", \
|
|
|
|
"--callable", "app", \
|
|
|
|
"--pythonpath", "/txtdiary/app" ]
|