Skip to content
Snippets Groups Projects
Commit 3f5a36a6 authored by Empiriker's avatar Empiriker
Browse files

update Dockerfile

parent 958795bc
No related branches found
No related tags found
No related merge requests found
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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment