Skip to content

Commit

Permalink
containers/errorku: Error pages for routing from traefik
Browse files Browse the repository at this point in the history
  • Loading branch information
kallisti5 committed Jan 7, 2025
1 parent 09239d1 commit fa925a2
Show file tree
Hide file tree
Showing 20 changed files with 4,659 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/errorku.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build errorku
on:
push:
paths:
- containers/services/errorku/VERSION
jobs:
build:
env:
REPOSITORY: "ghcr.io/haiku"
CLASS: "services"
NAME: "errorku"
name: Build errorku container
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Detect version
id: detect-version
run: echo "RELEASE_VERSION=$(cat containers/${{env.CLASS}}/${{env.NAME}}/VERSION | grep -Ev "^#" | tail -1)" >> "$GITHUB_OUTPUT"
- name: List version
run: echo "Building ${{ steps.detect-version.outputs.RELEASE_VERSION }}..."
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Github Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push multi-architecture image
uses: docker/build-push-action@v5
with:
context: containers/${{env.CLASS}}/${{env.NAME}}
push: true
tags: |
${{env.REPOSITORY}}/${{env.NAME}}:${{ steps.detect-version.outputs.RELEASE_VERSION }}-amd64
${{env.REPOSITORY}}/${{env.NAME}}:${{ steps.detect-version.outputs.RELEASE_VERSION }}-arm64
platforms: linux/amd64,linux/arm64
- uses: int128/docker-manifest-create-action@v2
with:
tags: ${{env.REPOSITORY}}/${{env.NAME}}:${{ steps.detect-version.outputs.RELEASE_VERSION }}
sources: |
${{env.REPOSITORY}}/${{env.NAME}}:${{ steps.detect-version.outputs.RELEASE_VERSION }}-amd64
${{env.REPOSITORY}}/${{env.NAME}}:${{ steps.detect-version.outputs.RELEASE_VERSION }}-arm64
4 changes: 4 additions & 0 deletions containers/services/errorku/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM docker.io/nginx:alpine
COPY templates /usr/share/nginx/html
EXPOSE 80

8 changes: 8 additions & 0 deletions containers/services/errorku/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
VERSION = $(shell cat VERSION | grep -Ev "^#" | tail -1)-development
REGISTRY = ghcr.io/haiku
default:
podman build --no-cache --tag ${REGISTRY}/errorku:${VERSION} .
test:
podman kill errorku-test || true
podman run -d --replace --name errorku-test -P ${REGISTRY}/errorku:$(VERSION)
@echo "http://`podman port errorku-test 80 | sed 's/0.0.0.0/127.0.0.1/'`"
2 changes: 2 additions & 0 deletions containers/services/errorku/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ONLY UPDATE ONCE READY TO BUILD NEW RELEASE
20250107
7 changes: 7 additions & 0 deletions containers/services/errorku/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
server {
listen 8080;
root /templates;

location / {
}
}
Loading

0 comments on commit fa925a2

Please sign in to comment.