feat(docker): add Docker deployment configuration
Add production-ready Docker setup with multi-stage Dockerfile, docker-compose orchestration for API, PostgreSQL, Redis, and Nginx services. Includes health checks, non-root user execution, and proper networking. - Add multi-stage Dockerfile with gunicorn/gevent workers - Add docker-compose.yml with api, db, redis, nginx services - Add nginx reverse proxy configuration with security headers - Update .env.example with Docker and production variables - Add email provider configuration (Mailgun, SendGrid) - Add requests dependency for HTTP client support - Update documentation with Docker deployment guide - Rebrand project name from Gatehouse to Secuird
This commit is contained in:
+33
-4
@@ -2,8 +2,24 @@ FLASK_APP=manage.py
|
||||
FLASK_ENV=development
|
||||
FLASK_DEBUG=1
|
||||
|
||||
# Database
|
||||
DATABASE_URL=postgresql://user:password@localhost:5432/gatehouse_dev
|
||||
# ═════════════════════════════════════════════════════════════════════════════
|
||||
# Docker / Production
|
||||
# ═════════════════════════════════════════════════════════════════════════════
|
||||
COMPOSE_PROJECT_NAME=authy2
|
||||
FLASK_ENV=production
|
||||
POSTGRES_USER=authy2
|
||||
POSTGRES_PASSWORD=changeme-in-production
|
||||
POSTGRES_DB=authy2
|
||||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
|
||||
SQLALCHEMY_DATABASE_URI=${DATABASE_URL}
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
SESSION_REDIS_URL=redis://redis:6379/0
|
||||
RATELIMIT_STORAGE_URL=redis://redis:6379/1
|
||||
HTTP_PORT=80
|
||||
HTTPS_PORT=443
|
||||
API_PORT=5000
|
||||
|
||||
# Database (overridden by Docker values above)
|
||||
SQLALCHEMY_ECHO=False
|
||||
SQLALCHEMY_LOG_LEVEL=WARNING
|
||||
|
||||
@@ -15,7 +31,7 @@ CA_ENCRYPTION_KEY=change-me-in-production
|
||||
BCRYPT_LOG_ROUNDS=12
|
||||
|
||||
# Session cookies
|
||||
SESSION_COOKIE_SECURE=False
|
||||
SESSION_COOKIE_SECURE=True
|
||||
SESSION_COOKIE_SAMESITE=Lax
|
||||
# Only needed when sharing cookies across subdomains (e.g. api.example.com + ui.example.com)
|
||||
# SESSION_COOKIE_DOMAIN=example.com
|
||||
@@ -61,7 +77,7 @@ OIDC_BASE_URL=http://localhost:5000
|
||||
# WebAuthn
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
WEBAUTHN_RP_ID=localhost
|
||||
WEBAUTHN_RP_NAME=Gatehouse
|
||||
WEBAUTHN_RP_NAME=Secuird
|
||||
WEBAUTHN_ORIGIN=http://localhost:8080
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
@@ -81,6 +97,19 @@ SMTP_USERNAME=
|
||||
SMTP_PASSWORD=
|
||||
FROM_ADDRESS=noreply@gatehouse.local
|
||||
|
||||
# Email Provider (smtp, mailgun, sendgrid)
|
||||
# Note: SMTP is the default. Set to "mailgun" or "sendgrid" to use those providers
|
||||
EMAIL_PROVIDER=smtp
|
||||
|
||||
# Mailgun Configuration (used when EMAIL_PROVIDER=mailgun)
|
||||
# MAILGUN_API_KEY=your-mailgun-api-key
|
||||
# MAILGUN_DOMAIN=mg.yourdomain.com
|
||||
# MAILGUN_API_URL=https://api.mailgun.net/v3
|
||||
|
||||
# SendGrid Configuration (used when EMAIL_PROVIDER=sendgrid)
|
||||
# SENDGRID_API_KEY=SG.your-sendgrid-api-key
|
||||
# SENDGRID_FROM_EMAIL=noreply@yourdomain.com
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Logging
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user