fix: Docker deps, volume mount

This commit is contained in:
eneller
2025-07-03 11:40:04 +02:00
parent 63dbf47f65
commit 0c368df0de
3 changed files with 7 additions and 6 deletions

View File

@@ -2,11 +2,13 @@ FROM python:3.12
VOLUME [ "/app/src/epub2go_web/media" ]
EXPOSE 50000/tcp
EXPOSE 50000/udp
ENV DJANGO_DEBUG=FALSE
COPY --from=ghcr.io/astral-sh/uv:0.7.18 /uv /uvx /bin/
WORKDIR /app
# Install dependencies
RUN apt-get update
RUN apt-get install -y pandoc
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \

View File

@@ -11,6 +11,8 @@ services:
- "50000:50000"
env_file:
- .env
volumes:
- ./data:/app/src/epub2go_web/media
redis:
image: redis
celery:
@@ -20,4 +22,6 @@ services:
- app
env_file:
- .env
volumes:
- ./data:/app/src/epub2go_web/media
command: uv run --directory=/app/src celery -A epub2go_web worker --loglevel=INFO

View File

@@ -15,11 +15,6 @@ import environ
import os
from pathlib import Path
env = environ.Env(
# set casting, default value
DEBUG=(bool, False)
)
# Build paths inside the project like this: BASE_DIR / 'subdir'.
PROJ_DIR = Path(__file__).resolve().parent
@@ -33,7 +28,7 @@ BASE_DIR = PROJ_DIR.parent
SECRET_KEY = "django-insecure-^@m5bl*8x+=@c^b0lhkgb-%_#9#&oad=v15jq=!0$g#x17zjf8"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = os.environ.get('DJANGO_DEBUG', True)
ALLOWED_HOSTS = ['*']