Compare commits
7 Commits
build_2025
...
build_2025
| Author | SHA1 | Date | |
|---|---|---|---|
|
1dcb8c6826
|
|||
|
2b6870b861
|
|||
|
ceb7a74b11
|
|||
|
fd4e17a754
|
|||
|
4ed73f7c72
|
|||
|
066a3864dd
|
|||
|
9a4902291e
|
@@ -57,7 +57,7 @@ jobs:
|
||||
# Tag 'latest' pour la branche master
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
# Tag avec le SHA pour les autres branches
|
||||
type=sha,prefix={{branch}}-
|
||||
type=sha,prefix=sha-
|
||||
labels: |
|
||||
org.opencontainers.image.title=${{ env.IMAGE_NAME }}
|
||||
org.opencontainers.image.description=Bot Discord de moi
|
||||
|
||||
@@ -1,22 +1,34 @@
|
||||
# Starting from node
|
||||
FROM node:22-alpine
|
||||
FROM node:22-slim
|
||||
|
||||
ENV NODE_ENV=production
|
||||
# Install build dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y ffmpeg python3 make g++
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
RUN chown node:node ./
|
||||
USER node
|
||||
|
||||
RUN apk add --no-cache ffmpeg python3 make g++
|
||||
|
||||
# Copy package files and install only production dependencies
|
||||
# Copy package files first
|
||||
COPY package.json package-lock.json* .
|
||||
RUN npm ci --only=production --ignore-scripts && \
|
||||
npm install bufferutil zlib-sync
|
||||
|
||||
# Copy the builded files and the charts
|
||||
# Install app dependencies
|
||||
ENV NODE_ENV=production
|
||||
RUN npm ci --only=production --ignore-scripts && \
|
||||
npm install bufferutil zlib-sync && \
|
||||
npm cache clean --force
|
||||
|
||||
# Copy the builded files
|
||||
COPY ./dist/* .
|
||||
|
||||
# Set the permissions
|
||||
RUN chown -R node:node /app
|
||||
# Return to root user to remove build dependencies
|
||||
USER root
|
||||
RUN apt-get remove -y python3 make g++ && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Go back to node user
|
||||
USER node
|
||||
|
||||
# Start the application
|
||||
|
||||
32
deploy/templates/ingress.yaml
Normal file
32
deploy/templates/ingress.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: omegamaestro.{{ .Values.ingress.domain }}
|
||||
cert-manager.io/cluster-issuer: {{ .Values.ingress.issuer }}
|
||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||
{{- if .Values.ingress.geoip }}
|
||||
nginx.ingress.kubernetes.io/server-snippet: |
|
||||
if ($lan = yes) { set $allowed_country yes; }
|
||||
if ($allowed_country = no) { return 451; }
|
||||
{{- end }}
|
||||
spec:
|
||||
ingressClassName: {{ .Values.ingress.class }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }}
|
||||
secretName: {{ .Release.Name }}-tls
|
||||
rules:
|
||||
- host: "{{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }}"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: "{{ .Release.Name }}-{{ .Values.service.name }}"
|
||||
port:
|
||||
name: {{ .Values.service.name }}
|
||||
{{- end }}
|
||||
15
deploy/templates/service.yaml
Normal file
15
deploy/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
{{- if .Values.service.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-{{ .Values.service.name }}"
|
||||
spec:
|
||||
selector:
|
||||
pod: {{ .Release.Name }}
|
||||
ports:
|
||||
- name: {{ .Values.service.name }}
|
||||
port: {{ .Values.deployment.env.TWURPLE_PORT | default .Values.service.port }}
|
||||
targetPort: {{ .Values.deployment.env.TWURPLE_PORT | default .Values.service.port }}
|
||||
protocol: TCP
|
||||
type: {{ .Values.service.type }}
|
||||
{{- end }}
|
||||
@@ -3,7 +3,7 @@ deployment:
|
||||
strategy: RollingUpdate
|
||||
image:
|
||||
repository: "rgy.angels-dev.fr/prod/bot_tamiseur"
|
||||
tag: "4.0.0"
|
||||
tag: "build_2025-06-10_01h49"
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
NODE_ENV: "production"
|
||||
@@ -16,3 +16,16 @@ deployment:
|
||||
requests:
|
||||
Cpu: "0.1"
|
||||
Memory: "50Mi"
|
||||
|
||||
service:
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
name: twurple
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
class: nginx
|
||||
subdomain: dcb-chantier.prd
|
||||
domain: angels-dev.fr
|
||||
issuer: letsencrypt-prod
|
||||
geoip: false
|
||||
Reference in New Issue
Block a user