🔧 configure application environment variables

Sets up environment variables within the docker-compose file,
replacing the use of a .env file. This includes defining
variables for Django secret key, allowed hosts, SMTP settings,
and sender name. This change improves configuration management
and clarifies the necessary environment settings.
This commit is contained in:
Marc Koch 2025-06-25 17:02:50 +02:00
parent e6ab41594d
commit 07ddbb793e
Signed by: marc
GPG Key ID: 12406554CFB028B9
1 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,6 @@
--- ---
services: services:
app: app:
image: git.extrasolar.space/marc/room-booking.git:latest
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
@ -9,7 +8,14 @@ services:
- "8000:8000" - "8000:8000"
volumes: volumes:
- app-data:/data - app-data:/data
env_file: .env environment:
- DJANGO_SECRET_KEY=A_VERY_SECRETKEY_KEY # adjust this
- DJANGO_ALLOWED_HOSTS=www.example.org # adjust this (comma-separated list of allowed hosts)
- SMTP_EMAIL=room-booking@example.org # adjust this
- SMTP_PASSWORD=YOUR_SMTP_PASSWORD # adjust this
- SMTP_SERVER=your.smtp.server # adjust this
- SMTP_PORT=587 # adjust this if necessary
- SMTP_SENDER_NAME=Room Booking System # adjust this if you want
volumes: volumes:
app-data: app-data: