Compare commits
1 Commits
90e5624576
...
b5e6c1f159
| Author | SHA1 | Date | |
|---|---|---|---|
| b5e6c1f159 |
@@ -8,4 +8,3 @@ coverage
|
|||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
README.md
|
README.md
|
||||||
.codex
|
|
||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
conventional-commits:
|
conventional-commits:
|
||||||
runs-on: [self-hosted, linux]
|
runs-on: [self-hosted, linux, k8s]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ name: Deploy monie-backend to dev (kaniko)
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ develop ]
|
branches: [ develop ]
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
@@ -27,12 +26,7 @@ jobs:
|
|||||||
REPO_PATH: monie/monie-backend.git
|
REPO_PATH: monie/monie-backend.git
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Skip deploy for pull requests
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
run: echo "Pull request check passed. Deploy runs only on push to develop."
|
|
||||||
|
|
||||||
- name: Debug
|
- name: Debug
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
echo "sha=${{ github.sha }}"
|
echo "sha=${{ github.sha }}"
|
||||||
@@ -41,7 +35,6 @@ jobs:
|
|||||||
microk8s kubectl version --client=true
|
microk8s kubectl version --client=true
|
||||||
|
|
||||||
- name: Build & push with Kaniko (K8s Job)
|
- name: Build & push with Kaniko (K8s Job)
|
||||||
if: github.event_name == 'push'
|
|
||||||
env:
|
env:
|
||||||
SHA: ${{ github.sha }}
|
SHA: ${{ github.sha }}
|
||||||
REF: ${{ github.ref_name }}
|
REF: ${{ github.ref_name }}
|
||||||
@@ -138,7 +131,6 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Deploy to dev
|
- name: Deploy to dev
|
||||||
if: github.event_name == 'push'
|
|
||||||
env:
|
env:
|
||||||
SHA: ${{ github.sha }}
|
SHA: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
# .gitea/workflows/deploy-prod.yml
|
||||||
name: Deploy monie-backend (kaniko)
|
name: Deploy monie-backend (kaniko)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
@@ -27,12 +27,7 @@ jobs:
|
|||||||
REPO_PATH: monie/monie-backend.git
|
REPO_PATH: monie/monie-backend.git
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Skip deploy for pull requests
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
run: echo "Pull request check passed. Deploy runs only on push to main."
|
|
||||||
|
|
||||||
- name: Build & push image with Kaniko (K8s Job)
|
- name: Build & push image with Kaniko (K8s Job)
|
||||||
if: github.event_name == 'push'
|
|
||||||
env:
|
env:
|
||||||
SHA: ${{ github.sha }}
|
SHA: ${{ github.sha }}
|
||||||
REF: ${{ github.ref_name }}
|
REF: ${{ github.ref_name }}
|
||||||
@@ -125,7 +120,6 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Deploy to prod
|
- name: Deploy to prod
|
||||||
if: github.event_name == 'push'
|
|
||||||
env:
|
env:
|
||||||
SHA: ${{ github.sha }}
|
SHA: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -34,7 +34,6 @@ lerna-debug.log*
|
|||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
.codex
|
|
||||||
|
|
||||||
# dotenv environment variable files
|
# dotenv environment variable files
|
||||||
.env
|
.env
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
FROM node:24-bookworm-slim AS deps
|
FROM node:22-bookworm-slim AS deps
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
FROM node:24-bookworm-slim AS build
|
FROM node:22-bookworm-slim AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build && npm prune --omit=dev
|
RUN npm run build && npm prune --omit=dev
|
||||||
|
|
||||||
FROM node:24-bookworm-slim AS runner
|
FROM node:22-bookworm-slim AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|||||||
Reference in New Issue
Block a user