#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
|
FROM docker.io/library/node:22-alpine
|
||||||
LABEL org.opencontainers.image.source https://gianet.us/codyops/nucleus
|
LABEL org.opencontainers.image.source https://gianet.us/codyops/nucleus
|
||||||
COPY . /opt
|
ENV NODE_ENV=production
|
||||||
WORKDIR /opt
|
COPY package.json package-lock.json /app
|
||||||
RUN npm run build
|
COPY dist/ /app/dist
|
||||||
|
WORKDIR app
|
||||||
|
RUN npm run setup
|
||||||
CMD npm run start
|
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",
|
"description": "CodyOps Nucleus",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm i && npx tsc",
|
"setup": "npm ci",
|
||||||
|
"build": "npx tsc",
|
||||||
"start": "node dist/main.js",
|
"start": "node dist/main.js",
|
||||||
"dev": "tsc-watch --noClear --onSuccess 'node ./dist/main.js'"
|
"dev": "tsc-watch --noClear --onSuccess 'node ./dist/main.js'"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user