10 Commits

Author SHA1 Message Date
Sebastian Seedorf
fe4ad86710 ci: use version-bump action for semver tagging
Some checks failed
Build & Push / build (push) Failing after 10m4s
2026-05-19 17:22:52 +02:00
Sebastian Seedorf
cd35b8e85e restructure: move mod files into plugin/ directory
Some checks failed
Build & Push / build (push) Failing after 1m41s
2026-05-19 13:52:27 +02:00
Caesar2011
3af0af01e0 build/patch: use build-context for docker-build-push action
All checks were successful
Build & Push / build (push) Successful in 3m53s
2026-05-18 18:41:29 +02:00
Caesar2011
456fde28a5 build/patch: update gitea action references to use https
Some checks failed
Build & Push / build (push) Failing after 1m17s
2026-05-18 18:35:29 +02:00
Caesar2011
159eb7fbc3 build/patch: update workflow to use actions from git.sebse.de
Some checks failed
Build & Push / build (push) Failing after 3s
2026-05-18 18:31:34 +02:00
Caesar2011
d5047e2f89 Refactored to external actions
Some checks failed
Build & Push / build (push) Failing after 4s
2026-05-18 18:27:58 +02:00
Caesar2011
67646c80d2 Added helm update to deployment
All checks were successful
Build & Push / build (push) Successful in 1m45s
2026-05-18 17:16:42 +02:00
Caesar2011
ee139f9518 Added app.kubernetes.io/component label to app
All checks were successful
Build & Push / build (push) Successful in 1m52s
2026-05-17 23:32:47 +02:00
Caesar2011
8f200514b1 Added migration docker image
All checks were successful
Build & Push / build (push) Successful in 3m45s
2026-05-17 23:04:15 +02:00
Caesar2011
b90038ea4c Added chart version
All checks were successful
Build & Push / build (push) Successful in 3m35s
2026-05-17 21:46:25 +02:00
20 changed files with 62 additions and 1167 deletions

View File

@@ -6,8 +6,7 @@ on:
- main - main
env: env:
REGISTRY: git.sebse.de CHART_PATH: web/charts/factorio-signal-exporter
IMAGE: git.sebse.de/sebse/factorio-signal-exporter
jobs: jobs:
build: build:
@@ -17,39 +16,49 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Log in to Gitea Container Registry - name: Bump version
uses: docker/login-action@v3 id: version
uses: https://git.sebse.de/sebse/actions/version-bump@main
with:
token: ${{ github.token }}
- name: Set env vars
run: |
echo "IMAGE=git.sebse.de/${{ github.repository }}" >> $GITHUB_ENV
echo "IMAGE_MIGRATE=git.sebse.de/${{ github.repository }}-migrate" >> $GITHUB_ENV
- name: Docker login
uses: https://git.sebse.de/sebse/actions/docker-login@main
with: with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata - name: Build and push app
id: meta uses: https://git.sebse.de/sebse/actions/docker-build-push@main
uses: docker/metadata-action@v5
with: with:
images: ${{ env.IMAGE }} image: ${{ env.IMAGE }}
tags: | build-context: ./web
type=sha,prefix=,format=short
type=raw,value=latest
- name: Build and push - name: Build and push migrate
uses: docker/build-push-action@v5 uses: https://git.sebse.de/sebse/actions/docker-build-push@main
with: with:
context: ./web image: ${{ env.IMAGE_MIGRATE }}
push: true build-context: ./web
tags: ${{ steps.meta.outputs.tags }} dockerfile: ./web/Dockerfile.migrate
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.IMAGE }}:latest
cache-to: type=inline
- name: Package Helm chart - name: Package and push helm chart
run: helm package web/charts/factorio-signal-exporter uses: https://git.sebse.de/sebse/actions/helm-package-push@main
with:
chart-path: ${{ env.CHART_PATH }}
version: ${{ steps.version.outputs.version }}
app-version: ${{ steps.version.outputs.version }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Push Helm chart to Gitea - name: Deploy to prod
run: | uses: https://git.sebse.de/sebse/actions/helm-deploy@main
curl -u ${{ secrets.GITEA_USERNAME }}:${{ secrets.GITEA_TOKEN }} \ with:
-X POST \ app: factorio-signal-exporter
https://${{ env.REGISTRY }}/api/packages/sebse/helm/api/charts \ profile: prod
-F "chart=@factorio-signal-exporter-0.1.0.tgz" \ version: ${{ steps.version.outputs.version }}
--fail-with-body ssh-key: ${{ secrets.HELMBOT_SSH_KEY }}

File diff suppressed because it is too large Load Diff

10
web/Dockerfile.migrate Normal file
View File

@@ -0,0 +1,10 @@
FROM node:24-alpine
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
COPY migrations/ ./migrations/
CMD ["npm", "run", "migrate"]

View File

@@ -2,5 +2,5 @@ apiVersion: v2
name: factorio-signal-exporter name: factorio-signal-exporter
description: Factorio Signal Exporter — Next.js dashboard with TimescaleDB description: Factorio Signal Exporter — Next.js dashboard with TimescaleDB
type: application type: application
version: 0.1.0 version: 0.0.0-dev
appVersion: "latest" appVersion: "latest"

View File

@@ -26,12 +26,6 @@ spec:
env: env:
- name: POSTGRES_USER - name: POSTGRES_USER
value: {{ .Values.db.user | quote }} value: {{ .Values.db.user | quote }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "factorio-signal-exporter.secretName" . }}
key: DATABASE_URL
optional: false
- name: POSTGRES_PASSWORD - name: POSTGRES_PASSWORD
value: {{ .Values.db.password | quote }} value: {{ .Values.db.password | quote }}
- name: POSTGRES_DB - name: POSTGRES_DB

View File

@@ -9,10 +9,13 @@ spec:
selector: selector:
matchLabels: matchLabels:
{{- include "factorio-signal-exporter.selectorLabels" . | nindent 6 }} {{- include "factorio-signal-exporter.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: app
template: template:
metadata: metadata:
labels: labels:
{{- include "factorio-signal-exporter.selectorLabels" . | nindent 8 }} {{- include "factorio-signal-exporter.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: app
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
@@ -20,9 +23,8 @@ spec:
{{- end }} {{- end }}
initContainers: initContainers:
- name: migrate - name: migrate
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} image: {{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.initImage.pullPolicy }}
command: ["npm", "run", "migrate"]
env: env:
- name: DATABASE_URL - name: DATABASE_URL
valueFrom: valueFrom:

View File

@@ -8,6 +8,7 @@ spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
selector: selector:
{{- include "factorio-signal-exporter.selectorLabels" . | nindent 4 }} {{- include "factorio-signal-exporter.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: app
ports: ports:
- port: {{ .Values.service.port }} - port: {{ .Values.service.port }}
targetPort: 3000 targetPort: 3000

View File

@@ -1,7 +1,12 @@
image: image:
repository: git.sebse.de/sebse/factorio-signal-exporter repository: git.sebse.de/sebse/factorio-signal-exporter
tag: latest tag: latest
pullPolicy: IfNotPresent pullPolicy: Always
initImage:
repository: git.sebse.de/sebse/factorio-signal-exporter-migrate
tag: latest
pullPolicy: Always
imagePullSecrets: [] imagePullSecrets: []
@@ -20,7 +25,7 @@ db:
name: factorio name: factorio
port: 5432 port: 5432
storage: 10Gi storage: 10Gi
storageClassName: "" # leave empty for cluster default storageClassName: ""
service: service:
type: ClusterIP type: ClusterIP