This commit is contained in:
Roland Geider
2026-01-09 16:03:59 +01:00
parent 1c276ed3d7
commit 10bec7544c
5 changed files with 16 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ ENV DJANGO_SETTINGS_MODULE=settings.main
ENV MEDIA_ROOT=/home/wger/media ENV MEDIA_ROOT=/home/wger/media
ENV STATIC_ROOT=/home/wger/static ENV STATIC_ROOT=/home/wger/static
ENV DJANGO_DB_DATABASE=/home/wger/db/database.sqlite ENV DJANGO_DB_DATABASE=/home/wger/db/database.sqlite
ENV COMPRESS_OFFLINE=True ENV DJANGO_CACHE_BACKEND=django.core.cache.backends.locmem.LocMemCache
# Change permissions of some files and folders so the apache process can access them. # Change permissions of some files and folders so the apache process can access them.
RUN mkdir -p ~/static/CACHE ~/media \ RUN mkdir -p ~/static/CACHE ~/media \

View File

@@ -65,8 +65,9 @@ fi
# Sync ingredients # Sync ingredients
if [[ "$SYNC_INGREDIENTS_ON_STARTUP" == "True" ]]; if [[ "$SYNC_INGREDIENTS_ON_STARTUP" == "True" ]];
then then
echo "Syncing ingredients" echo "The option SYNC_INGREDIENTS_ON_STARTUP is not supported anymore as it needs several hours to complete."
python3 manage.py sync-ingredients echo "Please start the process manually with: docker compose exec web python3 manage.py sync-ingredients"
exit 1
fi fi
# Set the site URL # Set the site URL

View File

@@ -1,9 +1,10 @@
"""Local development settings for wger""" """Local development settings for wger"""
# ruff: noqa: F405 # ruff: noqa: F405
# ruff: noqa: F403
# wger # wger
from .settings_global import * # noqa: F403 from .settings_global import *
DEBUG = True DEBUG = True
@@ -119,6 +120,6 @@ DATABASES = {
# Import other local settings that are not in version control # Import other local settings that are not in version control
try: try:
from .local_dev_extra import * # noqa: F403 from .local_dev_extra import *
except ImportError: except ImportError:
pass pass

View File

@@ -20,7 +20,12 @@ import environ
# wger # wger
from .settings_global import * # noqa: F403 from .settings_global import * # noqa: F403
"""Main settings file for a production deployment of wger.""" """
Main settings file for a production deployment of wger.
For a more commented version of the options used here, please refer to
https://github.com/wger-project/docker/blob/master/config/prod.env
"""
env = environ.Env( env = environ.Env(
# set casting, default value # set casting, default value
@@ -136,10 +141,10 @@ if os.environ.get("DJANGO_CACHE_BACKEND"):
CACHES = { CACHES = {
'default': { 'default': {
'BACKEND': env.str("DJANGO_CACHE_BACKEND"), 'BACKEND': env.str("DJANGO_CACHE_BACKEND"),
'LOCATION': env.str("DJANGO_CACHE_LOCATION"), 'LOCATION': env.str("DJANGO_CACHE_LOCATION", ''),
'TIMEOUT': env.int("DJANGO_CACHE_TIMEOUT"), 'TIMEOUT': env.int("DJANGO_CACHE_TIMEOUT", 300),
'OPTIONS': { 'OPTIONS': {
'CLIENT_CLASS': env.str("DJANGO_CACHE_CLIENT_CLASS") 'CLIENT_CLASS': env.str("DJANGO_CACHE_CLIENT_CLASS", '')
} }
} }
} }

View File

@@ -406,7 +406,6 @@ THUMBNAIL_ALIASES = {
}, },
} }
STATIC_ROOT = ''
USE_S3 = os.getenv('USE_S3') == 'TRUE' USE_S3 = os.getenv('USE_S3') == 'TRUE'
if USE_S3: if USE_S3: