From c2ca2f772a07c3952f49fd40ede0d2da8d734880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Faguet?= Date: Thu, 7 May 2026 17:03:42 +0200 Subject: [PATCH] feat: valid CICD --- .forgejo/workflows/deploy.yaml | 17 +++++++++++------ Dockerfile | 9 ++++----- docker-compose.yml | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 docker-compose.yml diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index c57b91e..ec64f96 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -5,13 +5,19 @@ on: jobs: build-and-deploy: - runs-on: koda-k8s + runs-on: koda env: - NAMESPACE: siwa-game-prd - REGISTRY: siwa-game + NAMESPACE: clem-siwa-game-prd + REGISTRY: clem-siwa-game steps: - - name: Checkout code - uses: actions/checkout@v4 + - name: Install git-lfs + run: | + sudo apk add --no-cache git-lfs + git lfs install + + - uses: actions/checkout@v4 + with: + lfs: true - name: Helm lint charts run: | @@ -40,7 +46,6 @@ jobs: | sed "s/namespace: servadmin/namespace: $NAMESPACE/" \ | kubectl apply -f - - - name: Deploy with Helm run: | helm upgrade --install hugo charts \ diff --git a/Dockerfile b/Dockerfile index 0114ce0..94bca70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,8 @@ FROM hugomods/hugo:latest AS builder -WORKDIR /app -COPY . . +COPY ./src /src +RUN hugo build -RUN cd src && hugo build +FROM hugomods/hugo:nginx -FROM nginx:alpine -COPY --from=builder /app/src/public /usr/share/nginx/html +COPY --from=builder /src/public /site \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7be267b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.7" + +services: + clem-website: + build: . + restart: always + labels: + - traefik.enable=true + - traefik.docker.network=web + - traefik.http.routers.website_siwa.rule=Host(`siwa.deadpool.srv.obicorp.fr`) + - traefik.http.services.website_siwa.loadbalancer.server.port=80 + - traefik.http.routers.website_siwa.entrypoints=websecure + - traefik.http.routers.website_siwa.tls=true + - traefik.http.routers.website_siwa.tls.certresolver=myresolver + networks: + - web +networks: + web: + external: true