67 lines
4.1 KiB
HTML
67 lines
4.1 KiB
HTML
<h1 id="morlana-pages-free-subdomain-service">Morlana Pages Free Subdomain Service</h1>
|
|
|
|
<h2 id="overview">Overview</h2>
|
|
<p>This repository provides a free subdomain service for the <code class="language-plaintext highlighter-rouge">morlana.page</code> domain, similar to <code class="language-plaintext highlighter-rouge">js.org</code>. Users can request a subdomain by forking this repository, adding their domain entry to <code class="language-plaintext highlighter-rouge">domains.yaml</code>, and submitting a pull request.</p>
|
|
|
|
<h2 id="how-it-works">How It Works</h2>
|
|
<ol>
|
|
<li>Fork this repository.</li>
|
|
<li>Add your subdomain entry to <code class="language-plaintext highlighter-rouge">domains.yaml</code>, ensuring it is in alphabetical order.</li>
|
|
<li>Submit a pull request.</li>
|
|
<li>Once the PR is approved and merged, an automated workflow updates the DNS records via the Cloudflare API.</li>
|
|
</ol>
|
|
|
|
<h2 id="subdomain-requirements">Subdomain Requirements</h2>
|
|
<ul>
|
|
<li>Only <strong>CNAME</strong> records are allowed.</li>
|
|
<li>The Cloudflare proxy is <strong>enabled by default</strong>, but can be disabled per subdomain.</li>
|
|
<li>Reserved domains cannot be registered (e.g., <code class="language-plaintext highlighter-rouge">www.morlana.page</code>).</li>
|
|
</ul>
|
|
|
|
<h2 id="how-to-request-a-subdomain">How to Request a Subdomain</h2>
|
|
<h3 id="1-edit-domainsyaml">1. Edit <code class="language-plaintext highlighter-rouge">domains.yaml</code></h3>
|
|
<p>Add your subdomain under the <code class="language-plaintext highlighter-rouge">subdomains</code> section:</p>
|
|
|
|
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">subdomains</span><span class="pi">:</span>
|
|
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s2">"</span><span class="s">your-subdomain"</span>
|
|
<span class="na">target</span><span class="pi">:</span> <span class="s2">"</span><span class="s">your-site.example.com"</span>
|
|
<span class="na">proxy</span><span class="pi">:</span> <span class="kc">true</span> <span class="c1"># Set to false if you want to disable the Cloudflare proxy</span>
|
|
<span class="na">note</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Optional</span><span class="nv"> </span><span class="s">description"</span>
|
|
</code></pre></div></div>
|
|
|
|
<h3 id="2-submit-a-pull-request">2. Submit a Pull Request</h3>
|
|
<ul>
|
|
<li>Ensure that your subdomain entry is in <strong>alphabetical order</strong>.</li>
|
|
<li>Verify that your CNAME target is correct.</li>
|
|
<li>Create a pull request with your changes.</li>
|
|
</ul>
|
|
|
|
<h2 id="reserved-domains">Reserved Domains</h2>
|
|
<p>Some subdomains are <strong>reserved</strong> and cannot be registered. The list includes:</p>
|
|
<ul>
|
|
<li><code class="language-plaintext highlighter-rouge">www.morlana.page</code></li>
|
|
<li><code class="language-plaintext highlighter-rouge">api.morlana.page</code></li>
|
|
<li><code class="language-plaintext highlighter-rouge">mail.morlana.page</code></li>
|
|
<li>Domains matching specific patterns (e.g., <code class="language-plaintext highlighter-rouge">admin.*</code>, <code class="language-plaintext highlighter-rouge">internal.*</code>).</li>
|
|
</ul>
|
|
|
|
<h2 id="automation">Automation</h2>
|
|
<p>Once a pull request is merged, a GitHub Action will:</p>
|
|
<ol>
|
|
<li>Validate the <code class="language-plaintext highlighter-rouge">domains.yaml</code> file.</li>
|
|
<li>Check for duplicate or reserved domains.</li>
|
|
<li>Update the Cloudflare DNS settings automatically.</li>
|
|
</ol>
|
|
|
|
<h2 id="setup-for-maintainers">Setup for Maintainers</h2>
|
|
<h3 id="environment-variables">Environment Variables</h3>
|
|
<p>To enable Cloudflare DNS updates, set the following secrets in Gitea:</p>
|
|
<ul>
|
|
<li><code class="language-plaintext highlighter-rouge">CLOUDFLARE_API_TOKEN</code>: API token with DNS write access.</li>
|
|
<li><code class="language-plaintext highlighter-rouge">CLOUDFLARE_ZONE_ID</code>: Cloudflare Zone ID for <code class="language-plaintext highlighter-rouge">morlana.page</code>.</li>
|
|
</ul>
|
|
|
|
<h2 id="license">License</h2>
|
|
<p>This project is open-source and licensed under the BSD-3-Clause.</p>
|
|
|