chore: remove caddy-related and obsolete files

Removed:
- Caddyfile: Caddy reverse proxy config (replaced by nginx.conf)
- setup_https.sh: Caddy HTTPS setup script
- https_manager.py: Caddy HTTPS management utility
- HTTPS_STATUS.txt: Old HTTPS documentation
- docker-compose.http.yml: HTTP-only Caddy compose file
- player_auth_module.py: Old authentication module (unused)
- player_config_template.ini: Old player config template (unused)
- test connection.txr: Test file

Updated:
- init-data.sh: Removed references to deleted caddy/obsolete files
- .dockerignore: Removed obsolete ignore entries

This completes the Caddy → Nginx migration cleanup.
This commit is contained in:
Quality App Developer
2026-01-15 22:25:13 +02:00
parent 21eb63659a
commit d17ed79e29
10 changed files with 4 additions and 1157 deletions
-157
View File
@@ -1,157 +0,0 @@
"""Utility script for managing HTTPS configuration from command line."""
import sys
import os
sys.path.insert(0, '/app')
from app.app import create_app
from app.models.https_config import HTTPSConfig
def show_help():
"""Display help information."""
print("""
HTTPS Configuration Management Utility
======================================
Usage:
python https_manager.py <command> [arguments]
Commands:
status Show current HTTPS configuration status
enable <hostname> <domain> <email> <ip> [port]
Enable HTTPS with specified settings
disable Disable HTTPS
show Show detailed configuration
Examples:
# Show current status
python https_manager.py status
# Enable HTTPS
python https_manager.py enable digiserver digiserver.sibiusb.harting.intra admin@example.com 10.76.152.164 443
# Disable HTTPS
python https_manager.py disable
# Show detailed config
python https_manager.py show
""")
def show_status():
"""Show current HTTPS status."""
app = create_app()
with app.app_context():
config = HTTPSConfig.get_config()
if config:
print("\n" + "=" * 50)
print("HTTPS Configuration Status")
print("=" * 50)
print(f"Status: {'✅ ENABLED' if config.https_enabled else '⚠️ DISABLED'}")
print(f"Hostname: {config.hostname or 'N/A'}")
print(f"Domain: {config.domain or 'N/A'}")
print(f"IP Address: {config.ip_address or 'N/A'}")
print(f"Port: {config.port}")
print(f"Updated: {config.updated_at.strftime('%Y-%m-%d %H:%M:%S')} by {config.updated_by or 'N/A'}")
if config.https_enabled:
print(f"\nAccess URL: https://{config.domain}")
print(f"Fallback: http://{config.ip_address}")
print("=" * 50 + "\n")
else:
print("\n⚠️ No HTTPS configuration found. Use 'enable' command to create one.\n")
def enable_https(hostname: str, domain: str, ip_address: str, email: str, port: str = '443'):
"""Enable HTTPS with specified settings."""
app = create_app()
with app.app_context():
try:
port_num = int(port)
config = HTTPSConfig.create_or_update(
https_enabled=True,
hostname=hostname,
domain=domain,
ip_address=ip_address,
email=email,
port=port_num,
updated_by='cli_admin'
)
print("\n" + "=" * 50)
print("✅ HTTPS Configuration Updated")
print("=" * 50)
print(f"Hostname: {hostname}")
print(f"Domain: {domain}")
print(f"Email: {email}")
print(f"IP Address: {ip_address}")
print(f"Port: {port_num}")
print(f"\nAccess URL: https://{domain}")
print(f"Fallback: http://{ip_address}")
print("=" * 50 + "\n")
except Exception as e:
print(f"\n❌ Error: {str(e)}\n")
sys.exit(1)
def disable_https():
"""Disable HTTPS."""
app = create_app()
with app.app_context():
try:
config = HTTPSConfig.create_or_update(
https_enabled=False,
updated_by='cli_admin'
)
print("\n" + "=" * 50)
print("⚠️ HTTPS Disabled")
print("=" * 50)
print("The application is now running on HTTP only (port 80)")
print("=" * 50 + "\n")
except Exception as e:
print(f"\n❌ Error: {str(e)}\n")
sys.exit(1)
def show_config():
"""Show detailed configuration."""
app = create_app()
with app.app_context():
config = HTTPSConfig.get_config()
if config:
print("\n" + "=" * 50)
print("Detailed HTTPS Configuration")
print("=" * 50)
for key, value in config.to_dict().items():
print(f"{key:.<30} {value}")
print("=" * 50 + "\n")
else:
print("\n⚠️ No HTTPS configuration found.\n")
def main():
"""Main entry point."""
if len(sys.argv) < 2:
show_help()
sys.exit(1)
command = sys.argv[1].lower()
if command == 'status':
show_status()
elif command == 'enable':
if len(sys.argv) < 6:
print("\nError: 'enable' requires: hostname domain email ip_address [port]\n")
show_help()
sys.exit(1)
hostname = sys.argv[2]
domain = sys.argv[3]
email = sys.argv[4]
ip_address = sys.argv[5]
port = sys.argv[6] if len(sys.argv) > 6 else '443'
enable_https(hostname, domain, ip_address, email, port)
elif command == 'disable':
disable_https()
elif command == 'show':
show_config()
elif command in ['help', '-h', '--help']:
show_help()
else:
print(f"\nUnknown command: {command}\n")
show_help()
sys.exit(1)
if __name__ == '__main__':
main()