build: Dockerfile

This commit is contained in:
eneller
2025-07-01 23:55:16 +02:00
parent 7da9441933
commit ee5ed62881
2 changed files with 20 additions and 1 deletions

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM python:3.12
VOLUME [ "/app/src/epub2go_web/media" ]
EXPOSE 50000/tcp
EXPOSE 50000/udp
COPY --from=ghcr.io/astral-sh/uv:0.7.18 /uv /uvx /bin/
WORKDIR /app
# Install dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --locked --no-install-project
# Copy the project into the image
ADD . /app
WORKDIR /app/src
CMD ["uv", "run", "gunicorn", "-c", "gunicorn.py"]

View File

@@ -5,7 +5,7 @@ loglevel = "debug"
# The number of worker processes for handling requests
workers = 4
# The socket to bind
bind = "127.0.0.1:50000"
bind = "0.0.0.0:50000"
# Restart workers when code changes (development only!)
#reload = True
# Write access and error info to /var/log