From 50454504240c401b019a66c0dbdc3380b32ae0bf Mon Sep 17 00:00:00 2001 From: pedro Date: Fri, 8 Nov 2024 15:55:04 +0100 Subject: [PATCH] improve .env and docker-reset --- .env.example | 7 +++---- docker-reset.sh | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index cb97c80..ed60e95 100644 --- a/.env.example +++ b/.env.example @@ -1,17 +1,16 @@ DOMAIN=localhost +DEMO=true # note that with DEBUG=true, logs are more verbose (include tracebacks) DEBUG=true -DEMO=true +ALLOWED_HOSTS=localhost,localhost:8000,127.0.0.1, STATIC_ROOT=/tmp/static/ MEDIA_ROOT=/tmp/media/ -ALLOWED_HOSTS=localhost,localhost:8000,127.0.0.1, -DOMAIN=localhost EMAIL_HOST="mail.example.org" EMAIL_HOST_USER="fillme_noreply" EMAIL_HOST_PASSWORD="fillme_passwd" EMAIL_PORT=587 -EMAIL_USE_TLS=True +EMAIL_USE_TLS=true EMAIL_BACKEND="django.core.mail.backends.smtp.EmailBackend" EMAIL_FILE_PATH="/tmp/app-messages" ENABLE_EMAIL=false diff --git a/docker-reset.sh b/docker-reset.sh index bf14db2..9dc0032 100755 --- a/docker-reset.sh +++ b/docker-reset.sh @@ -14,6 +14,11 @@ main() { if [ "${DETACH:-}" ]; then detach_arg='-d' fi + + if [ ! -f .env ]; then + cp -v .env.example .env + echo "WARNING: .env was not there, .env.example was copied, this only happens once" + fi # remove old database sudo rm -vfr ./db/* docker compose down -v