mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2025-12-31 16:30:00 -06:00
Add comprehensive HTTPS support with two deployment options: - mkcert for local development with trusted certificates - Automatic SSL with Let's Encrypt for production HTTPS Implementation: - Add docker-compose.https-mkcert.yml for local HTTPS development - Add docker-compose.https-auto.yml for automatic SSL certificates - Create Dockerfile.mkcert for certificate generation - Add setup scripts (setup-https-mkcert.sh/bat) - Add startup scripts (start-https.sh/bat) - Add certificate generation script (generate-mkcert-certs.sh) CSRF and IP Access Fixes: - Fix CSRF token validation for IP-based access - Add CSRF troubleshooting documentation - Update configuration to handle various access patterns Documentation: - Add HTTPS_MKCERT_GUIDE.md with setup instructions - Add README_HTTPS.md with general HTTPS documentation - Add README_HTTPS_AUTO.md for automatic SSL setup - Add AUTOMATIC_HTTPS_SUMMARY.md - Add CSRF_IP_ACCESS_FIX.md and CSRF_IP_FIX_SUMMARY.md - Add docs/CSRF_IP_ACCESS_GUIDE.md - Update main README.md with HTTPS information Configuration: - Update .gitignore for SSL certificates and nginx configs - Update env.example with new HTTPS-related variables - Update docker-compose.yml with SSL configuration options This enables secure HTTPS access in both development and production environments while maintaining compatibility with existing deployments.
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
services:
|
|
# mkcert certificate manager - auto-generates trusted certificates
|
|
mkcert:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.mkcert
|
|
container_name: timetracker-mkcert
|
|
volumes:
|
|
- ./nginx/ssl:/certs
|
|
- mkcert-ca:/root/.local/share/mkcert
|
|
environment:
|
|
- HOST_IP=${HOST_IP:-192.168.1.100}
|
|
- CERT_DOMAINS=localhost 127.0.0.1 ::1 ${HOST_IP:-192.168.1.100} *.local timetracker.local
|
|
command: /generate-mkcert-certs.sh
|
|
restart: "no"
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: timetracker-nginx
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
|
- ./nginx/ssl:/etc/nginx/ssl:ro
|
|
depends_on:
|
|
mkcert:
|
|
condition: service_completed_successfully
|
|
app:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
|
|
app:
|
|
ports: [] # nginx handles all ports
|
|
environment:
|
|
- WTF_CSRF_SSL_STRICT=true
|
|
- SESSION_COOKIE_SECURE=true
|
|
- CSRF_COOKIE_SECURE=true
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
mkcert-ca:
|
|
driver: local
|
|
|