Initial commit: homelab configuration and documentation
This commit is contained in:
36
services/standalone/Caddy/Caddyfile
Normal file
36
services/standalone/Caddy/Caddyfile
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
# Global options
|
||||
admin off
|
||||
}
|
||||
|
||||
# Main fallback server
|
||||
:80 {
|
||||
root * /srv/maintenance
|
||||
file_server
|
||||
|
||||
# Serve maintenance page for all requests
|
||||
handle {
|
||||
rewrite * /maintenance.html
|
||||
file_server
|
||||
}
|
||||
|
||||
# Log all requests
|
||||
log {
|
||||
output file /var/log/caddy/access.log
|
||||
}
|
||||
}
|
||||
|
||||
# Optional: HTTPS fallback (if you have certificates)
|
||||
:443 {
|
||||
root * /srv/maintenance
|
||||
file_server
|
||||
|
||||
handle {
|
||||
rewrite * /maintenance.html
|
||||
file_server
|
||||
}
|
||||
|
||||
log {
|
||||
output file /var/log/caddy/access.log
|
||||
}
|
||||
}
|
||||
27
services/standalone/Caddy/docker-compose.yml
Normal file
27
services/standalone/Caddy/docker-compose.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
container_name: caddy_fallback
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- ./maintenance.html:/srv/maintenance/maintenance.html
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
- caddy_logs:/var/log/caddy
|
||||
networks:
|
||||
- caddy_net
|
||||
|
||||
volumes:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
caddy_logs:
|
||||
|
||||
networks:
|
||||
caddy_net:
|
||||
driver: bridge
|
||||
68
services/standalone/Caddy/maintenance.html
Normal file
68
services/standalone/Caddy/maintenance.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Service Maintenance</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
padding: 3rem;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 1rem;
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.status {
|
||||
display: inline-block;
|
||||
padding: 0.75rem 2rem;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 50px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.7; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>🔧 Maintenance Mode</h1>
|
||||
<p>Our services are temporarily unavailable due to maintenance or system updates.</p>
|
||||
<p>We'll be back online shortly. Thank you for your patience.</p>
|
||||
<div class="status">⏳ Please check back soon</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user