a692304748
New public register.php flow: email + a GD-rendered math CAPTCHA (no third-party service), a mailed temporary password doubling as email verification, forced password change on first login. Gated behind a new ALLOW_SELF_REGISTRATION toggle (default off). Login moves from username to email (falls back to username for pre-migration accounts without one yet, mirroring qr-vip's existing migration 006 pattern) - self-registration needs email as the identifier. New set_email.php interstitial for legacy accounts. Adds a small PHPMailer-based Mailer class (SMTP, with an unauthenticated-relay option via MAIL_SMTP_AUTH=false) since no mail infrastructure existed in this app before.
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
services:
|
|
qrforge-app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: "unless-stopped"
|
|
environment:
|
|
TYPE: "${TYPE:-docker}"
|
|
QRCODE_GENERATOR: "${QRCODE_GENERATOR:-internal-chillerlan.qrcode}"
|
|
BASE_URL: "${BASE_URL:-http://localhost}"
|
|
DATABASE_HOST: "qrforge-db"
|
|
DATABASE_PORT: "3306"
|
|
DATABASE_NAME: "${DATABASE_NAME:-qrcode}"
|
|
DATABASE_USER: "${DATABASE_USER:-qrcode}"
|
|
DATABASE_PASSWORD: "${DATABASE_PASSWORD:?zet DATABASE_PASSWORD in .env}"
|
|
DATABASE_PREFIX: "${DATABASE_PREFIX:-}"
|
|
DATABASE_CHARSET: "${DATABASE_CHARSET:-utf8}"
|
|
ALLOW_SELF_REGISTRATION: "${ALLOW_SELF_REGISTRATION:-false}"
|
|
MAIL_HOST: "mailhog"
|
|
MAIL_PORT: "1025"
|
|
MAIL_ENCRYPTION: ""
|
|
MAIL_SMTP_AUTH: "false"
|
|
MAIL_FROM_ADDRESS: "${MAIL_FROM_ADDRESS:-noreply@example.com}"
|
|
MAIL_FROM_NAME: "${MAIL_FROM_NAME:-QRForge}"
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
qrforge-db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./data/qrcode-storage:/var/www/qrcode-storage
|
|
networks:
|
|
- qrforge-network
|
|
|
|
mailhog:
|
|
image: "mailhog/mailhog:v1.0.1"
|
|
restart: "unless-stopped"
|
|
ports:
|
|
- "8025:8025" # web UI: http://localhost:8025
|
|
networks:
|
|
- qrforge-network
|
|
|
|
qrforge-db:
|
|
image: "mysql:8.0"
|
|
restart: "unless-stopped"
|
|
volumes:
|
|
- ./data/mysql:/var/lib/mysql
|
|
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD:?zet MYSQL_ROOT_PASSWORD in .env}"
|
|
MYSQL_DATABASE: "${DATABASE_NAME:-qrcode}"
|
|
MYSQL_USER: "${DATABASE_USER:-qrcode}"
|
|
MYSQL_PASSWORD: "${DATABASE_PASSWORD:?zet DATABASE_PASSWORD in .env}"
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
networks:
|
|
- qrforge-network
|
|
|
|
networks:
|
|
qrforge-network:
|
|
driver: bridge
|