Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0fe1bb4e9 | ||
|
|
9f1429a78c | ||
|
|
3ea0abcf7e | ||
|
|
2d5d19b295 | ||
|
|
cdf8ea98a1 | ||
|
|
e8f617ba06 | ||
|
|
3e93e5cc58 | ||
|
|
2682f11392 | ||
|
|
3a21ae1abc | ||
|
|
1ec3f0a891 |
@@ -0,0 +1,46 @@
|
|||||||
|
# Version control
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
# Gitea metadata and local CI files
|
||||||
|
.gitea
|
||||||
|
|
||||||
|
# IDE/editor files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
desktop.ini
|
||||||
|
|
||||||
|
# Environment and secrets
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Dependencies and build output
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# Logs and runtime artifacts
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Temporary/cache files
|
||||||
|
tmp
|
||||||
|
temp
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Local-only Docker files
|
||||||
|
docker-compose*.yml
|
||||||
|
docker-compose*.yaml
|
||||||
@@ -1 +1,2 @@
|
|||||||
|
IMAGE_TAG=latest
|
||||||
MAIN_PORT=8080
|
MAIN_PORT=8080
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "value=$version" >> "$GITHUB_OUTPUT"
|
echo "value=$version" >> "$GITEA_OUTPUT"
|
||||||
echo "docker_tag=$version" >> "$GITHUB_OUTPUT"
|
echo "docker_tag=$version" >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -51,11 +51,11 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
provenance: false
|
provenance: false
|
||||||
build-args: |
|
build-args: |
|
||||||
APP_VERSION=${{ steps.version.outputs.value }}
|
APP_VERSION=${{ gitea.sha }}
|
||||||
VCS_REF=${{ github.sha }}
|
VCS_REF=${{ gitea.run_number }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.version=${{ steps.version.outputs.value }}
|
org.opencontainers.image.version=${{ gitea.sha }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ gitea.run_number }}
|
||||||
org.opencontainers.image.source=https://github.com/${{ github.repository }}
|
org.opencontainers.image.source=${{ gitea.repositoryUrl }}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
name: Build Docker Image - Latest
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
create_release:
|
||||||
|
description: Create or update the Gitea release for this version
|
||||||
|
required: true
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: docker.lechner-systems.at
|
||||||
|
IMAGE_NAME: lechnersystems/maintenance
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Read version
|
||||||
|
id: version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
version="$(git rev-parse --short=12 HEAD)"
|
||||||
|
|
||||||
|
if [[ ! "$version" =~ ^[0-9a-f]{12}$ ]]; then
|
||||||
|
echo "Invalid git hash version: $version" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "value=$version" >> "$GITEA_OUTPUT"
|
||||||
|
echo "docker_tag=$version" >> "$GITEA_OUTPUT"
|
||||||
|
echo "release_tag=v$version" >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push latest image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
provenance: false
|
||||||
|
build-args: |
|
||||||
|
APP_VERSION=${{ gitea.sha }}
|
||||||
|
VCS_REF=${{ gitea.run_number }}
|
||||||
|
tags: |
|
||||||
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||||
|
labels: |
|
||||||
|
org.opencontainers.image.version=${{ gitea.sha }}
|
||||||
|
org.opencontainers.image.revision=${{ gitea.run_number }}
|
||||||
|
org.opencontainers.image.source=${{ gitea.repositoryUrl }}
|
||||||
|
|
||||||
|
- name: Create Gitea release
|
||||||
|
if: ${{ inputs.create_release }}
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
GITEA_API_URL: ${{ gitea.api_url }}
|
||||||
|
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||||
|
GITEA_SHA: ${{ gitea.sha }}
|
||||||
|
RELEASE_TAG: ${{ steps.version.outputs.release_tag }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
releases_url="$GITEA_API_URL/repos/$GITEA_REPOSITORY/releases"
|
||||||
|
auth_header="Authorization: token $GITEA_TOKEN"
|
||||||
|
previous_tag="$(curl --fail --silent --show-error --header "$auth_header" "$releases_url?limit=100" | jq -r --arg tag "$RELEASE_TAG" '[.[] | select(.draft == false and .prerelease == false and .tag_name != $tag)][0].tag_name // empty')"
|
||||||
|
|
||||||
|
if [ -n "$previous_tag" ]; then
|
||||||
|
commit_messages="$(git log --reverse --format='- %s' "${previous_tag}..${GITEA_SHA}")"
|
||||||
|
full_changelog="${{ gitea.server_url }}/${GITEA_REPOSITORY}/compare/${previous_tag}...${RELEASE_TAG}"
|
||||||
|
else
|
||||||
|
commit_messages="$(git log --reverse --format='- %s' "${GITEA_SHA}")"
|
||||||
|
full_changelog=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$commit_messages" ]; then
|
||||||
|
commit_messages="- No commits since the previous release"
|
||||||
|
fi
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "## Changes"
|
||||||
|
echo
|
||||||
|
printf "%s\n" "$commit_messages"
|
||||||
|
echo
|
||||||
|
if [ -n "$full_changelog" ]; then
|
||||||
|
echo "**Full Changelog**: ${full_changelog}"
|
||||||
|
fi
|
||||||
|
} > release-notes.md
|
||||||
|
|
||||||
|
payload="$(jq -Rs --arg tag "$RELEASE_TAG" --arg target "$GITEA_SHA" '{tag_name: $tag, target_commitish: $target, name: $tag, body: ., draft: false, prerelease: false}' release-notes.md)"
|
||||||
|
status="$(curl --silent --show-error --output release.json --write-out '%{http_code}' --header "$auth_header" "$releases_url/tags/$RELEASE_TAG")"
|
||||||
|
|
||||||
|
if [ "$status" = 200 ]; then
|
||||||
|
release_id="$(jq -r '.id' release.json)"
|
||||||
|
curl --fail-with-body --silent --show-error --request PATCH --header "$auth_header" --header 'Content-Type: application/json' --data "$payload" "$releases_url/$release_id"
|
||||||
|
elif [ "$status" = 404 ]; then
|
||||||
|
curl --fail-with-body --silent --show-error --request POST --header "$auth_header" --header 'Content-Type: application/json' --data "$payload" "$releases_url"
|
||||||
|
else
|
||||||
|
cat release.json
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
||||||
patreon: # Replace with a single patreon username
|
|
||||||
open_collective: # Replace with a single Open Collective username
|
|
||||||
ko_fi: fraujulian
|
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
||||||
liberapay: # Replace with a single Liberapay username
|
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
|
||||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
||||||
polar: # Replace with a single Polar username
|
|
||||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
||||||
thanks_dev: # Replace with a single thanks dev username
|
|
||||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
name: Build Docker Image - Latest
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
create_release:
|
|
||||||
description: Create or update the GitHub release for this version
|
|
||||||
required: true
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: docker.lechner-systems.at
|
|
||||||
IMAGE_NAME: lechnersystems/maintenance
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Read version
|
|
||||||
id: version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
version="$(git rev-parse --short=12 HEAD)"
|
|
||||||
|
|
||||||
if [[ ! "$version" =~ ^[0-9a-f]{12}$ ]]; then
|
|
||||||
echo "Invalid git hash version: $version" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "value=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "docker_tag=$version" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "release_tag=v$version" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push latest image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
provenance: false
|
|
||||||
build-args: |
|
|
||||||
APP_VERSION=${{ steps.version.outputs.value }}
|
|
||||||
VCS_REF=${{ github.sha }}
|
|
||||||
tags: |
|
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.docker_tag }}
|
|
||||||
labels: |
|
|
||||||
org.opencontainers.image.version=${{ steps.version.outputs.value }}
|
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
|
||||||
org.opencontainers.image.source=https://github.com/${{ github.repository }}
|
|
||||||
|
|
||||||
- name: Create GitHub release
|
|
||||||
if: ${{ inputs.create_release }}
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
RELEASE_TAG: ${{ steps.version.outputs.release_tag }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
previous_tag="$(gh release list --exclude-drafts --exclude-pre-releases --limit 100 --json tagName --jq '.[].tagName' | grep -Fxv "$RELEASE_TAG" | head -n 1 || true)"
|
|
||||||
|
|
||||||
if [ -n "$previous_tag" ]; then
|
|
||||||
commit_messages="$(git log --reverse --format='- %s' "${previous_tag}..${GITHUB_SHA}")"
|
|
||||||
full_changelog="https://github.com/${{ github.repository }}/compare/${previous_tag}...${RELEASE_TAG}"
|
|
||||||
else
|
|
||||||
commit_messages="$(git log --reverse --format='- %s' "${GITHUB_SHA}")"
|
|
||||||
full_changelog=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$commit_messages" ]; then
|
|
||||||
commit_messages="- No commits since the previous release"
|
|
||||||
fi
|
|
||||||
|
|
||||||
{
|
|
||||||
echo "## Changes"
|
|
||||||
echo
|
|
||||||
printf "%s\n" "$commit_messages"
|
|
||||||
echo
|
|
||||||
if [ -n "$full_changelog" ]; then
|
|
||||||
echo "**Full Changelog**: ${full_changelog}"
|
|
||||||
fi
|
|
||||||
} > release-notes.md
|
|
||||||
|
|
||||||
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
|
|
||||||
gh release edit "$RELEASE_TAG" --title "$RELEASE_TAG" --notes-file release-notes.md
|
|
||||||
else
|
|
||||||
gh release create "$RELEASE_TAG" --target "${GITHUB_SHA}" --title "$RELEASE_TAG" --notes-file release-notes.md
|
|
||||||
fi
|
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
FROM nginx:1.27-alpine
|
FROM nginx:1.27-alpine
|
||||||
|
|
||||||
ARG APP_VERSION=0.0.0
|
|
||||||
ARG VCS_REF=unknown
|
ARG VCS_REF=unknown
|
||||||
|
ARG APP_VERSION=unknown
|
||||||
|
|
||||||
LABEL org.opencontainers.image.title="Maintenance Website"
|
LABEL org.opencontainers.image.title="MaintenanceWebsite"
|
||||||
LABEL org.opencontainers.image.description="Static maintenance website"
|
LABEL org.opencontainers.image.description="❌ A simple HTML/CSS/JS maintenance website. "
|
||||||
|
LABEL org.opencontainers.image.licenses="GPL-3.0-only"
|
||||||
LABEL org.opencontainers.image.version="${APP_VERSION}"
|
LABEL org.opencontainers.image.version="${APP_VERSION}"
|
||||||
LABEL org.opencontainers.image.revision="${VCS_REF}"
|
LABEL org.opencontainers.image.revision="${VCS_REF}"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/Lechner-Systems/MaintenanceWebsite"
|
LABEL org.opencontainers.image.source="https://git.lechner-systems.at/fraujulian/MaintenanceWebsite"
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY index.html /usr/share/nginx/html/index.html
|
COPY index.html /usr/share/nginx/html/index.html
|
||||||
|
|||||||
@@ -2,17 +2,15 @@
|
|||||||
|
|
||||||
### [🙋♂️ Website Preview](https://lechner-systems.at/)
|
### [🙋♂️ Website Preview](https://lechner-systems.at/)
|
||||||
|
|
||||||
<img width="2559" height="1173" alt="image" src="https://github.com/user-attachments/assets/8709217f-5395-4e8b-af21-d32de98b1a09" />
|
|
||||||
|
|
||||||
### 🪪 License
|
### 🪪 License
|
||||||
Icons: [Icons8.com](https://icons8.com/)
|
Icons: [Icons8.com](https://icons8.com/)
|
||||||
|
|
||||||
Modified by Julian Lechner.
|
Modified by Julian Lechner.
|
||||||
Based on [Simple Maintenance Page](https://github.com/theoricher/Simple-Maintenance-Page).
|
Based on Simple Maintenance Page by theoricher.
|
||||||
Licensed under GNU GPL v3.
|
Licensed under GNU GPL v3.
|
||||||
|
|
||||||
## 🤝 Enjoy?
|
## 🤝 Enjoy?
|
||||||
|
|
||||||
Give it a star ⭐ on [GitHub](https://github.com/FrauJulian/Personal-Portfolio-Website)!
|
Give it a star ⭐ on [Gitea](https://git.lechner-systems.at/FrauJulian/Personal-Portfolio-Website)!
|
||||||
|
|
||||||
### Greetings from Austria! ⛰️
|
### Greetings from Austria! ⛰️
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
portfolio:
|
maintenance:
|
||||||
image: docker.lechner-systems.at/lechnersystems/maintenance:${IMAGE_TAG:-latest}
|
image: docker.lechner-systems.at/lechnersystems/maintenance:${IMAGE_TAG:-latest}
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
|
||||||
- path: .env
|
|
||||||
required: false
|
|
||||||
dns:
|
dns:
|
||||||
- 192.168.100.2
|
- 192.168.100.2
|
||||||
- 192.168.100.6
|
- 192.168.100.6
|
||||||
|
|||||||
|
After Width: | Height: | Size: 2.8 MiB |
|
After Width: | Height: | Size: 1006 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 407 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 33 KiB |
@@ -5,6 +5,10 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
location /images/ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|||||||