Add landing page, Hetzner labels, and Codeberg link
- Add default landing page (roles/caddy/templates/index.html.j2) deployed
to empty caddy sites; adapted from YC/coming-soon by Steven Tang (MIT),
with site domain and powered-by footer linking to codeberg.org/opennomad/linderhof
- Apply hcloud_labels to all Hetzner cloud and DNS resources; default to {}
in role defaults for stacks without the variable defined
- Fix setup.sh: export stack_name so envsubst substitutes it in config.yml
- Add Codeberg repo link to README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bd90a7e16f
commit
e4fdcdc279
8 changed files with 112 additions and 1 deletions
|
|
@ -38,6 +38,16 @@
|
|||
mode: "0775" # also allow members of the docker group to write
|
||||
loop: "{{ caddy_sites }}"
|
||||
|
||||
- name: Deploy default landing page for empty sites
|
||||
template:
|
||||
src: index.html.j2
|
||||
dest: "/srv/caddy/sites/{{ item }}/index.html"
|
||||
owner: root
|
||||
group: docker
|
||||
mode: "0644"
|
||||
force: false # never overwrite real content
|
||||
loop: "{{ caddy_sites }}"
|
||||
|
||||
- name: Install Caddyfile
|
||||
template:
|
||||
src: Caddyfile.j2
|
||||
|
|
|
|||
86
roles/caddy/templates/index.html.j2
Normal file
86
roles/caddy/templates/index.html.j2
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{#
|
||||
Adapted from "Coming Soon" by Steven Tang (github.com/YC/coming-soon)
|
||||
MIT License — https://github.com/YC/coming-soon/blob/master/LICENSE
|
||||
#}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ item }}</title>
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
background: #0f1117;
|
||||
color: #e8e8e8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
animation: fadein 2s ease forwards;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(1.8rem, 5vw, 3rem);
|
||||
font-weight: 600;
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -0.02em;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: clamp(1rem, 2.5vw, 1.25rem);
|
||||
font-weight: 300;
|
||||
color: #a0a0a0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.dot {
|
||||
color: #00b98b;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 1.5rem;
|
||||
width: 100%;
|
||||
font-size: 0.8rem;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
color: #00b98b;
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>{{ item }}<span class="dot">.</span></h1>
|
||||
<p>Something's on its way.</p>
|
||||
</main>
|
||||
<footer>
|
||||
powered by <a href="https://codeberg.org/opennomad/linderhof" target="_blank" rel="noopener">linderhof</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue