diff --git a/.gitignore b/.gitignore index 691da68..2b069c9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ /.vscode/ +/docker-compose.yml + __pycache__/ diff --git a/Dockerfile b/Dockerfile index 37eb414..ac5b6e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,18 +2,17 @@ FROM python:3.11.6-alpine3.18 +RUN addgroup -S td && adduser -S td -G td + WORKDIR /txtdiary -COPY requirements.txt ./requirements.txt -COPY app ./src -COPY LICENSE ./LICENSE +COPY LICENSE . -RUN pip install . pyuwsgi -r requirements.txt +COPY requirements.txt . +RUN pip install pyuwsgi -r requirements.txt -CMD [ "uwsgi" - , "--http", "127.0.0.1:8000" - , "--master" - , "-w" ,"src:app" - ] +COPY ./src ./app -EXPOSE 8000 +USER td + +CMD [ "uwsgi", "--http", "0.0.0.0:80", "-M", "-w" ,"app.app", "--callable", "app" ]