From 1048034d637b89e5f6b8dc14a101dd0d961e522f Mon Sep 17 00:00:00 2001 From: Simonas Kareiva Date: Tue, 12 May 2026 17:25:59 +0300 Subject: [PATCH] Add example dev settings --- .env.example | 34 ++++++++++++++++++++++++++++++++++ manage.py | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..04ae2cb --- /dev/null +++ b/.env.example @@ -0,0 +1,34 @@ +# Copy this file to `.env` and fill in real values. Compose interpolates +# ${...} references in compose.yaml directly from `.env`, and the `web` +# container also receives the whole file via `env_file:`. + +# --- Django --- +# Generate a fresh key in prod, e.g. +# python -c "import secrets; print(secrets.token_urlsafe(64))" +SECRET_KEY=replace-me-with-a-long-random-string +DEBUG=true +ALLOWED_HOSTS=localhost,127.0.0.1 + +# --- PostgreSQL --- +# Used by the `db` container and interpolated into DATABASE_URL inside +# compose.yaml; the `web` container reads DATABASE_URL via dj-database-url. +POSTGRES_DB=hamprint +POSTGRES_USER=hamprint +POSTGRES_PASSWORD=changeme + +# --- Mailjet (transactional email) --- +# Only used when running with `hamprint.settings.prod`; `hamprint.settings.dev` +# overrides EMAIL_BACKEND to the console backend so emails are printed to +# the `web` container logs. +# Get keys at https://app.mailjet.com/account/apikeys +MAILJET_API_KEY= +MAILJET_API_SECRET= +DEFAULT_FROM_EMAIL=hamprint + +# --- Google OAuth (django-allauth Google provider) --- +# Configure at https://console.cloud.google.com/apis/credentials and add a +# SocialApp via Django admin (/admin/socialaccount/socialapp/add/). +# Leave blank until the `allauth.socialaccount.providers.google` line is +# uncommented in hamprint/settings/base.py. +GOOGLE_CLIENT_ID= +GOOGLE_CLIENT_SECRET= diff --git a/manage.py b/manage.py index 4231c7d..c624ff0 100755 --- a/manage.py +++ b/manage.py @@ -7,7 +7,7 @@ import sys def main(): """Run administrative tasks.""" - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hamprint.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hamprint.settings.dev") try: from django.core.management import execute_from_command_line except ImportError as exc: