From 057e800b1bd3108cea7ede6257b94b2de9ce5cf0 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Fri, 1 Aug 2025 23:48:36 +0200 Subject: [PATCH] Add docker build --- .docker/.dockerignore | 6 + .docker/Dockerfile | 17 ++ .docker/build-docker.sh | 34 ++++ .docker/nginx.conf | 16 ++ public/404.html | 100 +++++++++++ .../incr-stable-release/index.html | 159 ++++++++++++++++++ public/announcements/index.html | 125 ++++++++++++++ public/index.html | 134 +++++++++++++++ public/robots.txt | 4 + public/sitemap.xml | 13 ++ 10 files changed, 608 insertions(+) create mode 100644 .docker/.dockerignore create mode 100644 .docker/Dockerfile create mode 100755 .docker/build-docker.sh create mode 100644 .docker/nginx.conf create mode 100644 public/404.html create mode 100644 public/announcements/incr-stable-release/index.html create mode 100644 public/announcements/index.html create mode 100644 public/index.html create mode 100644 public/robots.txt create mode 100644 public/sitemap.xml diff --git a/.docker/.dockerignore b/.docker/.dockerignore new file mode 100644 index 0000000..c886510 --- /dev/null +++ b/.docker/.dockerignore @@ -0,0 +1,6 @@ +public/ +.git/ +.gitignore +README.md +Dockerfile +.dockerignore \ No newline at end of file diff --git a/.docker/Dockerfile b/.docker/Dockerfile new file mode 100644 index 0000000..1cf10dd --- /dev/null +++ b/.docker/Dockerfile @@ -0,0 +1,17 @@ +# Build stage +FROM alpine:latest as builder + +# Install Zola +RUN apk add --no-cache zola + +WORKDIR /app +COPY . . +RUN zola build + +# Runtime stage +FROM docker.io/library/nginx:alpine + +COPY --from=builder /app/public /usr/share/nginx/html +COPY .docker/nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 \ No newline at end of file diff --git a/.docker/build-docker.sh b/.docker/build-docker.sh new file mode 100755 index 0000000..9576728 --- /dev/null +++ b/.docker/build-docker.sh @@ -0,0 +1,34 @@ +#\!/bin/bash +set -e + +# Check if tag is provided +if [ $# -eq 0 ]; then + echo "Usage: $0 " + echo "Example: $0 v0.1.2" + exit 1 +fi + +# Configuration +REGISTRY="codeberg.org" +NAMESPACE="lvl0" +IMAGE_NAME="website" +TAG="$1" +FULL_IMAGE="${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:${TAG}" + +echo "Building Docker image: ${FULL_IMAGE}" + +# Build the image +docker build -f .docker/Dockerfile -t "${FULL_IMAGE}" . + +# Also tag as latest +LATEST_IMAGE="${REGISTRY}/${NAMESPACE}/${IMAGE_NAME}:latest" +docker tag "${FULL_IMAGE}" "${LATEST_IMAGE}" + +echo "Image built successfully!" +echo "Tagged as: ${FULL_IMAGE}" +echo "Tagged as: ${LATEST_IMAGE}" +echo "" +echo "To push to registry, run:" +echo "docker login ${REGISTRY}" +echo "docker push ${FULL_IMAGE}" +echo "docker push ${LATEST_IMAGE}" diff --git a/.docker/nginx.conf b/.docker/nginx.conf new file mode 100644 index 0000000..d26edd0 --- /dev/null +++ b/.docker/nginx.conf @@ -0,0 +1,16 @@ +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /404.html; + } + + # Cache static assets + location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } +} \ No newline at end of file diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..09506f9 --- /dev/null +++ b/public/404.html @@ -0,0 +1,100 @@ + + + + + + + + + + 404: Page not found | lvl0 + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ lvl0 + +
+
+
+ +
+
+ + + + +
+ +

404: Page not found

+ +
+ + + + + + + + + + + diff --git a/public/announcements/incr-stable-release/index.html b/public/announcements/incr-stable-release/index.html new file mode 100644 index 0000000..a82554d --- /dev/null +++ b/public/announcements/incr-stable-release/index.html @@ -0,0 +1,159 @@ + + + + + + + + + incr 0.1.2: First Stable Release | lvl0 + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ lvl0 + +
+
+
+ +
+
+ + + + +
+ +
+ + + + +
+

incr 0.1.2: First Stable Release

+ +
· +
+ +
+ +
+
+ + Table of Contents + +
+ +
+
+
+ + +

We're excited to announce the first stable release of incr - our FIRE journey tracking tool that focuses on shares, not slogans.

+

What is incr?

+

incr is a minimalist tool designed to help you track your Financial Independence, Retire Early (FIRE) journey with precision and clarity. Instead of flashy charts and motivational slogans, incr focuses on what matters: tracking your investment shares and real progress toward financial independence.

+

Key Features

+
    +
  • Share-based tracking: Monitor your portfolio in actual shares, not just dollar amounts
  • +
  • Self-hosted: Keep your financial data private and under your control
  • +
  • Minimalist design: Clean, distraction-free interface that focuses on your data
  • +
  • Long-term thinking: Built for the patient investor pursuing financial autonomy
  • +
+

Get Started

+

Visit incr.lvl0.xyz to learn more and start tracking your FIRE journey today.

+
+
+ + + + + +
+ +
+ + + + + + + + + + + diff --git a/public/announcements/index.html b/public/announcements/index.html new file mode 100644 index 0000000..b5c0c07 --- /dev/null +++ b/public/announcements/index.html @@ -0,0 +1,125 @@ + + + + + + + + + Announcements | lvl0 + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ lvl0 + +
+
+
+ +
+
+ + + + +
+ +

Announcements

+

Stay updated with the latest news and releases from lvl0.

+
+
+
+
+

+ + incr 0.1.2: First Stable Release + +

+ +
+ We're excited to announce the first stable release of incr - our FIRE journey tracking tool that focuses on shares, not slogans. +What is incr? +incr is a minimalist tool designed to help you track your… +
+ + Read more → + +
+
+
+ +
+ + + + + + + + + + + diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..175ae89 --- /dev/null +++ b/public/index.html @@ -0,0 +1,134 @@ + + + + + + + + + lvl0 + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ lvl0 + +
+
+
+ +
+
+ + + + +
+ +

lvl0 is a starting point.

+

We build tiny, focused tools that support calm productivity, financial independence, and long-term thinking.

+

Our projects embrace minimalism, self-hosting, and the pursuit of autonomy — in tech, finance, and life.

+

Current Projects

+

incr — Track your FIRE journey in shares, not slogans. A minimalist tool for monitoring your path to financial independence with precision and clarity.

+
+
+

Recent Announcements

+
+
+

+ + incr 0.1.2: First Stable Release + +

+ +
+ We're excited to announce the first stable release of incr - our FIRE journey tracking tool that focuses on shares, not slogans. +What is incr? +incr is… +
+
+
+ +
+ + + + +
+ + + + + + + + + + + diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..4f929b9 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: +Allow: / +Sitemap: https://lvl0.xyz/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..efce724 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,13 @@ + + + + https://lvl0.xyz/ + + + https://lvl0.xyz/announcements/ + + + https://lvl0.xyz/announcements/incr-stable-release/ + 2025-08-01 + +