fix
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user