mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Cleanup
This commit is contained in:
@@ -110,7 +110,7 @@ ENV DJANGO_SETTINGS_MODULE=settings.main
|
||||
ENV MEDIA_ROOT=/home/wger/media
|
||||
ENV STATIC_ROOT=/home/wger/static
|
||||
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.
|
||||
RUN mkdir -p ~/static/CACHE ~/media \
|
||||
|
||||
@@ -65,8 +65,9 @@ fi
|
||||
# Sync ingredients
|
||||
if [[ "$SYNC_INGREDIENTS_ON_STARTUP" == "True" ]];
|
||||
then
|
||||
echo "Syncing ingredients"
|
||||
python3 manage.py sync-ingredients
|
||||
echo "The option SYNC_INGREDIENTS_ON_STARTUP is not supported anymore as it needs several hours to complete."
|
||||
echo "Please start the process manually with: docker compose exec web python3 manage.py sync-ingredients"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set the site URL
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
"""Local development settings for wger"""
|
||||
|
||||
# ruff: noqa: F405
|
||||
# ruff: noqa: F403
|
||||
|
||||
# wger
|
||||
from .settings_global import * # noqa: F403
|
||||
from .settings_global import *
|
||||
|
||||
DEBUG = True
|
||||
|
||||
@@ -119,6 +120,6 @@ DATABASES = {
|
||||
|
||||
# Import other local settings that are not in version control
|
||||
try:
|
||||
from .local_dev_extra import * # noqa: F403
|
||||
from .local_dev_extra import *
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
@@ -20,7 +20,12 @@ import environ
|
||||
# wger
|
||||
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(
|
||||
# set casting, default value
|
||||
@@ -136,10 +141,10 @@ if os.environ.get("DJANGO_CACHE_BACKEND"):
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': env.str("DJANGO_CACHE_BACKEND"),
|
||||
'LOCATION': env.str("DJANGO_CACHE_LOCATION"),
|
||||
'TIMEOUT': env.int("DJANGO_CACHE_TIMEOUT"),
|
||||
'LOCATION': env.str("DJANGO_CACHE_LOCATION", ''),
|
||||
'TIMEOUT': env.int("DJANGO_CACHE_TIMEOUT", 300),
|
||||
'OPTIONS': {
|
||||
'CLIENT_CLASS': env.str("DJANGO_CACHE_CLIENT_CLASS")
|
||||
'CLIENT_CLASS': env.str("DJANGO_CACHE_CLIENT_CLASS", '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,7 +406,6 @@ THUMBNAIL_ALIASES = {
|
||||
},
|
||||
}
|
||||
|
||||
STATIC_ROOT = ''
|
||||
USE_S3 = os.getenv('USE_S3') == 'TRUE'
|
||||
|
||||
if USE_S3:
|
||||
|
||||
Reference in New Issue
Block a user