Compare commits
12 commits
feat/seque
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c8eb2ae88 | |||
| 50554a84c4 | |||
| e718ac2312 | |||
| a719126650 | |||
| 7d4045844a | |||
| 025c3a8714 | |||
| b0c3f695a8 | |||
| 7d4aee53ef | |||
| 19176a6bb0 | |||
| 99ce69ec12 | |||
| 6f9b112378 | |||
| f6a971b194 |
6 changed files with 16 additions and 14 deletions
|
|
@ -10,20 +10,20 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: http://192.168.1.230:3000/nholtware/workflows/node-checks@main
|
- uses: https://git.holtlabs.xyz/nholtware/workflows/node-checks@v1
|
||||||
- uses: http://192.168.1.230:3000/nholtware/workflows/lint-checks@main
|
- uses: https://git.holtlabs.xyz/nholtware/workflows/lint-checks@v1
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: checks
|
needs: checks
|
||||||
runs-on: host
|
runs-on: host
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: http://192.168.1.230:3000/nholtware/workflows/build-push@main
|
- uses: https://git.holtlabs.xyz/nholtware/workflows/build-push@v1
|
||||||
with:
|
with:
|
||||||
app-name: demo-app
|
app-name: demo-app
|
||||||
registry-user: ${{ secrets.REGISTRY_USER }}
|
registry-user: ${{ secrets.REGISTRY_USER }}
|
||||||
registry-token: ${{ secrets.REGISTRY_TOKEN }}
|
registry-token: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
- uses: http://192.168.1.230:3000/nholtware/workflows/gitops-bump@main
|
- uses: https://git.holtlabs.xyz/nholtware/workflows/gitops-bump@v1
|
||||||
with:
|
with:
|
||||||
app-name: demo-app
|
app-name: demo-app
|
||||||
gitops-token: ${{ secrets.GITOPS_TOKEN }}
|
gitops-token: ${{ secrets.GITOPS_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,5 @@ jobs:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: http://192.168.1.230:3000/nholtware/workflows/node-checks@main
|
- uses: https://git.holtlabs.xyz/nholtware/workflows/node-checks@v1
|
||||||
- uses: http://192.168.1.230:3000/nholtware/workflows/lint-checks@main
|
- uses: https://git.holtlabs.xyz/nholtware/workflows/lint-checks@v1
|
||||||
|
|
|
||||||
8
.github/workflows/pr.yml
vendored
8
.github/workflows/pr.yml
vendored
|
|
@ -7,12 +7,12 @@ on:
|
||||||
- synchronize
|
- synchronize
|
||||||
- reopened
|
- reopened
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- "**"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- "**"
|
||||||
- '!main'
|
- "!main"
|
||||||
- '!master'
|
- "!master"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
|
session-*.md
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,15 @@ COPY tsconfig.json ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Runtime stage: no dev deps (this service has zero runtime deps)
|
# Runtime stage: production deps only
|
||||||
FROM node:22-slim
|
FROM node:22-slim
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ARG GIT_SHA=dev
|
ARG GIT_SHA=dev
|
||||||
ENV GIT_SHA=${GIT_SHA}
|
ENV GIT_SHA=${GIT_SHA}
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
COPY --from=build /app/dist ./dist
|
COPY --from=build /app/dist ./dist
|
||||||
COPY package.json ./
|
|
||||||
USER node
|
USER node
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", "dist/index.js"]
|
CMD ["node", "dist/bin/server.js"]
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Minimal TypeScript microservice proving out the homelab CI/CD pipeline:
|
||||||
push to main
|
push to main
|
||||||
-> Forgejo Actions (nholtware/workflows composite actions)
|
-> Forgejo Actions (nholtware/workflows composite actions)
|
||||||
checks: npm ci + lint + test (docker label)
|
checks: npm ci + lint + test (docker label)
|
||||||
build: docker build + push -> 192.168.1.230:3000/nholtware/demo-app:<sha>
|
build: docker build + push -> git.holtlabs.xyz/nholtware/demo-app:<sha>
|
||||||
deploy: kustomize edit set image -> commit to nholtware/gitops
|
deploy: kustomize edit set image -> commit to nholtware/gitops
|
||||||
-> ArgoCD syncs gitops -> k3s
|
-> ArgoCD syncs gitops -> k3s
|
||||||
-> served by Traefik at Host: demo-app.k3s.local
|
-> served by Traefik at Host: demo-app.k3s.local
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue