fix
All checks were successful
build-and-deploy / build (push) Successful in 13s
build-and-deploy / deploy (push) Successful in 16s

This commit is contained in:
2025-09-26 20:29:03 -06:00
parent 5b57ed92ae
commit 984279e756
3 changed files with 15 additions and 4 deletions

View File

@@ -19,9 +19,9 @@ jobs:
username: nucleo000 username: nucleo000
password: 7bc7b2fcd283bd6a251bef3ede368b7f897c919d password: 7bc7b2fcd283bd6a251bef3ede368b7f897c919d
- name: Build+push radiusnucleo - name: Build+push radiusnucleo (with SPA)
run: | run: |
docker build -t $REG/radiusnucleo:${{ github.sha }} -t $REG/radiusnucleo:latest ./node-api docker build -t $REG/radiusnucleo:${{ github.sha }} -t $REG/radiusnucleo:latest -f node-api/Dockerfile .
docker push $REG/radiusnucleo:${{ github.sha }} docker push $REG/radiusnucleo:${{ github.sha }}
docker push $REG/radiusnucleo:latest docker push $REG/radiusnucleo:latest

View File

@@ -2,7 +2,9 @@ version: "3.9"
services: services:
node: node:
build: ./node-api build:
context: .
dockerfile: node-api/Dockerfile
image: gitea.nucleoriofrio.com/nucleo000/radiusnucleo:latest image: gitea.nucleoriofrio.com/nucleo000/radiusnucleo:latest
environment: environment:
- VLAN_ID=2 - VLAN_ID=2

View File

@@ -1,11 +1,20 @@
FROM node:20-alpine AS frontend
WORKDIR /frontend
COPY ../frontend/package*.json ./
RUN npm ci || npm i
COPY ../frontend/ .
RUN npm run build
FROM node:20-alpine FROM node:20-alpine
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./ COPY package*.json ./
RUN npm ci --only=production || npm i --only=production RUN npm ci --only=production || npm i --only=production
COPY . . COPY . .
# Overwrite static with built SPA
COPY --from=frontend /frontend/dist /app/public
EXPOSE 3000 EXPOSE 3000
CMD ["node", "index.js"] CMD ["node", "index.js"]