From 3f5a36a6357282b1137911f4b772727735b66765 Mon Sep 17 00:00:00 2001 From: Empiriker <till.ueberfries@gmail.com> Date: Mon, 11 Sep 2023 17:16:40 +0200 Subject: [PATCH] update Dockerfile --- Dockerfile | 24 ++++++++++++------------ docker-compose.yaml | 17 ----------------- 2 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile index 08ee85f..b1d319c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ FROM python:3.11-bullseye + WORKDIR /app + COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt -# Install git -RUN apt-get update && apt-get install -y git -# Install wiktextract -RUN git clone https://github.com/tatuylonen/wiktextract.git && \ - cd wiktextract && \ - git checkout 205c4a2d88c27113f0117e0095f466605976af81 && \ - python -m pip install --use-pep517 . -# Uninstall git, remove temporary files and package lists -RUN apt-get purge -y git && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* + COPY /src/. ./src/ + +COPY /dumps/. ./dumps/ +RUN python ./src/load_templates.py +RUN rm -rf ./dumps + EXPOSE 80 -# Set Flask environment variables -ENV FLASK_APP=/src/app.py -CMD ["flask", "run", "--debug"] + +ENV FLASK_APP /app/src/app.py + +CMD ["python", "-u", "-m", "flask", "run", "--host=0.0.0.0", "--port=80", "--debug"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 8736c2e..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: '3' -services: - web: - build: - context: . - network: host - dockerfile: Dockerfile - environment: - FLASK_DEBUG: "on" - FLASK_APP: ./src/app.py - ports: - - "5000:80" - x-develop: - watch: - - action: sync - path: ./src - target: /src/ \ No newline at end of file -- GitLab