From 42dc654145f22540b0032e4f935c332b0df09675 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Tue, 17 Feb 2026 02:59:39 +0100 Subject: [PATCH] updated .env --- .env.example | 42 +++++++++++++++++----------------- backend/staticfiles/robots.txt | 19 +++++++++++++++ docker-compose.yml | 1 + frontend/Dockerfile | 2 ++ frontend/src/pages/About.tsx | 3 +++ 5 files changed, 46 insertions(+), 21 deletions(-) create mode 100644 backend/staticfiles/robots.txt diff --git a/.env.example b/.env.example index e27a96b..e7f22d3 100644 --- a/.env.example +++ b/.env.example @@ -1,39 +1,39 @@ # --- Application Security --- -# Set to a long, random string in production -SECRET_KEY=django-insecure-replace-this-in-production +# Set to a long, random string in production (e.g. 50+ chars) +SECRET_KEY="django-insecure-replace-this-in-production" # Set to "false" in production for security and performance DEBUG=true -# Custom URL for the Django Admin interface (e.g., secret-admin/) -ADMIN_URL=admin/ +# Custom URL for the Django Admin interface (e.g., my-secret-admin/) +ADMIN_URL="admin" # --- Hosting & Networking --- # The primary domain where your app is hosted (e.g., holy.narl.io) -# Comma-separated list for backend to allow requests -ALLOWED_HOSTS=localhost,127.0.0.1,backend +ALLOWED_HOSTS=localhost,127.0.0.1,backend,holy.narl.io -# CSRF protection: Comma-separated list of trusted origins (must start with http:// or https://) -CSRF_TRUSTED_ORIGINS=http://localhost:5173 +# CSRF protection: Comma-separated list of trusted origins (MUST start with https:// in production) +CSRF_TRUSTED_ORIGINS=https://holy.narl.io -# CORS protection: Comma-separated list of allowed origins (must match your frontend domain) -CORS_ALLOWED_ORIGINS=http://localhost:5173,http://127.0.0.1:5173 +# CORS protection: Comma-separated list of allowed origins +CORS_ALLOWED_ORIGINS=https://holy.narl.io # --- SMTP Configuration (Required for Email Verification) --- # For development, if EMAIL_HOST is empty, emails are printed to the console. EMAIL_HOST=smtp.gmail.com -EMAIL_PORT=587 -EMAIL_USE_TLS=true -EMAIL_HOST_USER=your-email@gmail.com -EMAIL_HOST_PASSWORD=your-app-specific-password +EMAIL_PORT=465 +EMAIL_USE_SSL=true +EMAIL_HOST_USER="your-email@gmail.com" +EMAIL_HOST_PASSWORD="your-app-specific-password" # --- Frontend Configuration --- -# The base URL of the backend API (e.g., https://holy.narl.io/api/) -VITE_API_URL=http://localhost:8000/api/ -VITE_ALLOWED_HOSTS=localhost +# The base URL of the backend API (MUST end with /api/) +VITE_API_URL=https://holy.narl.io/api/ +VITE_ALLOWED_HOSTS=localhost,holy.narl.io -# --- Impressum / Contact Details (Legal) --- -VITE_IMPRESSUM_NAME="Your Name or Project Name" -VITE_IMPRESSUM_STREET="Your Street Address" +# --- Impressum / Contact Details (Required for German Law ยง 5 TMG) --- +VITE_IMPRESSUM_NAME="Your First and Last Name" +VITE_IMPRESSUM_STREET="Street Name and House Number" VITE_IMPRESSUM_CITY="Postal Code and City" -VITE_IMPRESSUM_EMAIL="your-support@email.com" +VITE_IMPRESSUM_EMAIL="your-public-contact@email.com" +VITE_IMPRESSUM_PHONE="+49 123 456789" diff --git a/backend/staticfiles/robots.txt b/backend/staticfiles/robots.txt new file mode 100644 index 0000000..61a96b2 --- /dev/null +++ b/backend/staticfiles/robots.txt @@ -0,0 +1,19 @@ +User-agent: * +Disallow: /admin/ +Disallow: /api/ +Disallow: /settings/ +Disallow: /dashboard/ + +# Block AI scrapers specifically +User-agent: GPTBot +Disallow: / + +User-agent: CCBot +Disallow: / + +# Allow Google Search to index the catalog +User-agent: Googlebot +Allow: / +Allow: /flavor/ +Allow: /category/ +Allow: /profile/ diff --git a/docker-compose.yml b/docker-compose.yml index 063d1b8..b0e8510 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,6 +33,7 @@ services: - VITE_IMPRESSUM_STREET=${VITE_IMPRESSUM_STREET} - VITE_IMPRESSUM_CITY=${VITE_IMPRESSUM_CITY} - VITE_IMPRESSUM_EMAIL=${VITE_IMPRESSUM_EMAIL} + - VITE_IMPRESSUM_PHONE=${VITE_IMPRESSUM_PHONE} container_name: holy-frontend restart: unless-stopped networks: diff --git a/frontend/Dockerfile b/frontend/Dockerfile index fa016c0..e1f9a98 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -11,12 +11,14 @@ ARG VITE_IMPRESSUM_NAME ARG VITE_IMPRESSUM_STREET ARG VITE_IMPRESSUM_CITY ARG VITE_IMPRESSUM_EMAIL +ARG VITE_IMPRESSUM_PHONE ENV VITE_API_URL=${VITE_API_URL} ENV VITE_IMPRESSUM_NAME=${VITE_IMPRESSUM_NAME} ENV VITE_IMPRESSUM_STREET=${VITE_IMPRESSUM_STREET} ENV VITE_IMPRESSUM_CITY=${VITE_IMPRESSUM_CITY} ENV VITE_IMPRESSUM_EMAIL=${VITE_IMPRESSUM_EMAIL} +ENV VITE_IMPRESSUM_PHONE=${VITE_IMPRESSUM_PHONE} RUN npm run build diff --git a/frontend/src/pages/About.tsx b/frontend/src/pages/About.tsx index 2f4a057..52bb38c 100644 --- a/frontend/src/pages/About.tsx +++ b/frontend/src/pages/About.tsx @@ -57,6 +57,9 @@ const About: React.FC = () => { Kontakt: E-Mail: {import.meta.env.VITE_IMPRESSUM_EMAIL || '[Your Support Email Address]'}
+ {import.meta.env.VITE_IMPRESSUM_PHONE && ( + <>Telefon: {import.meta.env.VITE_IMPRESSUM_PHONE}
+ )} Internet: holy.narl.io