From d3a1a5cafaf90a4d2b7aaf5a668662fcdd5cc370 Mon Sep 17 00:00:00 2001 From: senior Date: Mon, 6 Jul 2026 09:10:41 +0000 Subject: [PATCH] Add static homepage, Dockerfile (nginx), and CI build/push workflow - index.html: clean static homepage (name + intro, links), light/dark mode - Dockerfile: nginx:1.27-alpine serves the page on :80 with a healthcheck - .gitea/workflows/build.yml: on push to main, build and push the image to git.ffaerber.duckdns.org/ffaerber/homepage (tags :latest and :sha) --- .gitea/workflows/build.yml | 42 ++++++++++++++++ Dockerfile | 11 +++++ index.html | 99 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 .gitea/workflows/build.yml create mode 100644 Dockerfile create mode 100644 index.html diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..516e4b8 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,42 @@ +name: build-and-push +run-name: "build-and-push · ${gitea.ref_name}" +# Builds the homepage image and pushes it to this Gitea instance's container +# registry as git.ffaerber.duckdns.org/ffaerber/homepage:latest on every push to main. +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + packages: write + +env: + IMAGE: git.ffaerber.duckdns.org/ffaerber/homepage + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to container registry + uses: docker/login-action@v3 + with: + registry: git.ffaerber.duckdns.org + username: ${{ gitea.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + ${{ env.IMAGE }}:latest + ${{ env.IMAGE }}:${{ gitea.sha }} + provenance: false \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..84a4da7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM nginx:1.27-alpine + +LABEL org.opencontainers.image.title="ffaerber/homepage" \ + org.opencontainers.image.source="https://git.ffaerber.duckdns.org/ffaerber/homepage" + +COPY index.html /usr/share/nginx/html/index.html + +EXPOSE 80 + +HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ + CMD wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1 \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..29afbf0 --- /dev/null +++ b/index.html @@ -0,0 +1,99 @@ + + + + + + ffaerber + + + +
+

ffaerber

+

Homelab & self-hosting enthusiast

+

+ Hi, I'm ffaerber. This is my corner of the internet — a self-hosted homepage + running on my homelab. I tinker with containers, Gitea, and anything that runs + on a quiet box in the corner. +

+

+ More coming soon. In the meantime, you can find my code over on Gitea. +

+ + +
+ + \ No newline at end of file