From 6397a7ea8f9b43b96ef54a70421ab7505dd7be52 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 21 Dec 2023 18:44:01 +0100 Subject: [PATCH] fix: dockerimage --- .gitignore | 2 ++ Dockerfile | 19 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) 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" ]