2
0
Fork 0

Store 'celerybeat-schedule' in a subdirectory

This commit is contained in:
Luca 2022-04-26 17:36:08 +02:00
parent 6546439bf4
commit e32ccc0b6a
4 changed files with 6 additions and 2 deletions

View File

@ -6,3 +6,4 @@ README.md
db.sqlite3 db.sqlite3
docker-compose.yml docker-compose.yml
env env
storage

View File

@ -13,6 +13,7 @@ COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
RUN mkdir -p storage
EXPOSE 8000 EXPOSE 8000

View File

@ -61,7 +61,7 @@ ROOT_URLCONF = "shiftregister.urls"
TEMPLATES = [ TEMPLATES = [
{ {
"BACKEND": "django.template.backends.django.DjangoTemplates", "BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [Path(BASE_DIR, Path("templates"))], "DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True, "APP_DIRS": True,
"OPTIONS": { "OPTIONS": {
"context_processors": [ "context_processors": [
@ -131,7 +131,7 @@ STATIC_ROOT = "/opt/shiftregister/static"
STATIC_URL = "static/" STATIC_URL = "static/"
STATICFILES_DIRS = [ STATICFILES_DIRS = [
Path(BASE_DIR, Path("assets")), BASE_DIR / "assets",
] ]
# Default primary key field type # Default primary key field type
@ -149,3 +149,5 @@ CELERY_BEAT_SCHEDULE = {
"schedule": float(getenv("SHIFT_IMPORT_INTERVAL", 60.0)), # seconds "schedule": float(getenv("SHIFT_IMPORT_INTERVAL", 60.0)), # seconds
}, },
} }
CELERY_BEAT_SCHEDULE_FILENAME = str(BASE_DIR / "storage" / "celerybeat-schedule")

0
storage/.gitkeep Normal file
View File