Add slim Phase 1 task 1.11 (Dockerfile + Gitea workflow) for pilot deploy
- Multi-stage Dockerfile (Node 22 alpine, BuildKit cache, non-root user). HEALTHCHECK and metrics port (9090) deferred until task 1.10 ships; comments document the resume. - .gitea/workflows/build.yml — single build job following the pattern of other TRM repos (no services/container, ubuntu-latest direct). Tests + typecheck + lint inline; image tagged :main. - compose.dev.yaml — local-build variant for verifying Dockerfile changes pre-push. Production deploy lives in the sibling deploy/ repo. - .env.example documenting all runtime env vars. - README updated to point at deploy/ for production and explain CI. - Task 1.11 marked done (slim variant) in ROADMAP and task file.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
name: Build and Push tcp-ingestion
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'test/**'
|
||||
- 'package.json'
|
||||
- 'pnpm-lock.yaml'
|
||||
- 'tsconfig.json'
|
||||
- 'tsconfig.test.json'
|
||||
- 'vitest.config.ts'
|
||||
- 'eslint.config.js'
|
||||
- 'Dockerfile'
|
||||
- '.dockerignore'
|
||||
- '.gitea/workflows/build.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node 22
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Enable pnpm
|
||||
run: corepack enable && corepack prepare pnpm@latest-9 --activate
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Typecheck
|
||||
run: pnpm typecheck
|
||||
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker-container
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.dev.microservices.al
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.dev.microservices.al/trm/tcp-ingestion:main
|
||||
|
||||
# Uncomment when a Portainer webhook is configured for auto-deploy.
|
||||
# - name: Trigger Portainer Deploy
|
||||
# if: success()
|
||||
# run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"
|
||||
Reference in New Issue
Block a user