diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9bfc32c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.git +.gitignore +.dockerignore +.env +poetry.lock +poetry.toml +pyproject.toml +README.md +tests/ \ No newline at end of file diff --git a/dockerfile b/dockerfile index 5fd988c..676cd64 100644 --- a/dockerfile +++ b/dockerfile @@ -1,6 +1,7 @@ FROM python:3.11-slim-bookworm RUN apt-get update && apt-get install -y --no-install-recommends \ + git \ libglib2.0-0 \ libsm6 \ libxrender1 \ @@ -13,6 +14,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /app COPY requirements.txt . +RUN pip install --no-cache-dir requests stem +RUN pip install --no-cache-dir git+https://github.com/karl0ss/requests_tor.git@ae1e85abb3bb2c25f431bd031c6d881986c626f6 RUN pip install --no-cache-dir -r requirements.txt COPY . . @@ -24,5 +27,5 @@ RUN echo $VERSION > VERSION EXPOSE 3001 -ENV FLASK_ENV production +ENV FLASK_ENV=production CMD ["./run.sh"] diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..1c81900 --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +flask run --host=0.0.0.0 --port=3001 \ No newline at end of file