feat: add Dockerfile, Helm chart, Gitea Actions workflow
Some checks failed
Build & Push / build (push) Failing after 5m41s

This commit is contained in:
Caesar2011
2026-05-17 20:36:29 +02:00
parent 20ed6ee9fb
commit e4e9ebd737
12 changed files with 356 additions and 30 deletions

View File

@@ -0,0 +1,70 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "factorio-dashboard.fullname" . }}
labels:
{{- include "factorio-dashboard.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.app.replicaCount }}
selector:
matchLabels:
{{- include "factorio-dashboard.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "factorio-dashboard.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: migrate
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["npm", "run", "migrate"]
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: {{ include "factorio-dashboard.secretName" . }}
key: DATABASE_URL
containers:
- name: app
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 3000
env:
- name: API_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "factorio-dashboard.secretName" . }}
key: API_TOKEN
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: {{ include "factorio-dashboard.secretName" . }}
key: DATABASE_URL
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}