#1 - Agregar builder para CI y algunos ajustes extras
All checks were successful
CodyOps Nucleus Builder / build-conteiner (pull_request) Successful in 51s
All checks were successful
CodyOps Nucleus Builder / build-conteiner (pull_request) Successful in 51s
This commit is contained in:
parent
ee371b82d0
commit
79fb069353
16
.gitea/workflows/builder.yaml
Normal file
16
.gitea/workflows/builder.yaml
Normal 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
|
||||
|
@ -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
15
Makefile
Normal 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)
|
@ -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'"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user