Files
365devnet/docker-compose.yml
Richard Bergsma 6fa07b4b63 Enhance SMTP configuration in docker-compose and email handler
- Updated docker-compose.yml to include optional SMTP settings with comments for clarity on configuration.
- Modified email-handler.ts to prioritize FROM_EMAIL for the sender address, falling back to SMTP_USER or ADMIN_EMAIL if not set, improving email handling flexibility.
2025-11-18 22:44:58 +01:00

50 lines
1.3 KiB
YAML

version: '3.8'
services:
# Main Astro SSR Application
web:
build:
context: .
dockerfile: Dockerfile
container_name: 365devnet-web
restart: unless-stopped
ports:
- "3000"
environment:
- NODE_ENV=production
- PORT=3000
- ENABLE_SSR_CSP=1
# SMTP Settings - Loaded from .env file or set here
# Uncomment and set these if not using .env file:
# - SMTP_HOST=smtp.your-server.com
# - SMTP_PORT=587
# - SMTP_USER=your-email@domain.com
# - SMTP_PASS=your-password
# - FROM_EMAIL=support@365devnet.eu # Optional: Custom "from" address
# - ADMIN_EMAIL=admin@365devnet.eu
# - WEBSITE_NAME=365DevNet
# Other settings
# - GEMINI_API_KEY=${GEMINI_API_KEY}
env_file:
- .env # SMTP settings will be loaded from this file
volumes:
# Mount logs directory if you want to persist logs
- ./logs:/app/logs
networks:
- devnet
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
devnet:
external: true
name: 365DevNet
# Optional: Add volumes for persistent data
volumes:
logs: