build: Dockerfile
This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal 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"]
|
||||||
@@ -5,7 +5,7 @@ loglevel = "debug"
|
|||||||
# The number of worker processes for handling requests
|
# The number of worker processes for handling requests
|
||||||
workers = 4
|
workers = 4
|
||||||
# The socket to bind
|
# The socket to bind
|
||||||
bind = "127.0.0.1:50000"
|
bind = "0.0.0.0:50000"
|
||||||
# Restart workers when code changes (development only!)
|
# Restart workers when code changes (development only!)
|
||||||
#reload = True
|
#reload = True
|
||||||
# Write access and error info to /var/log
|
# Write access and error info to /var/log
|
||||||
|
|||||||
Reference in New Issue
Block a user