Fix 1 - Migrar Codigo a TS #2

Merged
giacchetta merged 4 commits from 1-migrar-js-a-ts into main 2025-07-03 17:52:58 -03:00
4 changed files with 38 additions and 4 deletions
Showing only changes of commit 79fb069353 - Show all commits

View File

@ -0,0 +1,16 @@
name: CodyOps Nucleus Builder
on:
pull_request:
branches:
- main
jobs:
build-conteiner:
runs-on: fedora-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Make Build
run: make build

View File

@ -1,6 +1,8 @@
FROM docker.io/library/node:22-alpine
LABEL org.opencontainers.image.source https://gianet.us/codyops/nucleus
COPY . /opt
WORKDIR /opt
RUN npm run build
ENV NODE_ENV=production
COPY package.json package-lock.json /app
COPY dist/ /app/dist
WORKDIR app
RUN npm run setup
CMD npm run start

15
Makefile Normal file
View File

@ -0,0 +1,15 @@
REGISTRY:= gianet.us/codyops
IMAGE:= nucleus
.PHONY: init build setup
init:
direnv allow .
setup:
npm run setup
build: setup
npm run build
podman build --pull=newer --tag $(REGISTRY)/$(IMAGE) .
podman push $(REGISTRY)/$(IMAGE)

View File

@ -4,7 +4,8 @@
"description": "CodyOps Nucleus",
"main": "dist/index.js",
"scripts": {
"build": "npm i && npx tsc",
"setup": "npm ci",
"build": "npx tsc",
"start": "node dist/main.js",
"dev": "tsc-watch --noClear --onSuccess 'node ./dist/main.js'"
},