fix
This commit is contained in:
@@ -19,9 +19,9 @@ jobs:
|
||||
username: nucleo000
|
||||
password: 7bc7b2fcd283bd6a251bef3ede368b7f897c919d
|
||||
|
||||
- name: Build+push radiusnucleo
|
||||
- name: Build+push radiusnucleo (with SPA)
|
||||
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:latest
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@ version: "3.9"
|
||||
|
||||
services:
|
||||
node:
|
||||
build: ./node-api
|
||||
build:
|
||||
context: .
|
||||
dockerfile: node-api/Dockerfile
|
||||
image: gitea.nucleoriofrio.com/nucleo000/radiusnucleo:latest
|
||||
environment:
|
||||
- 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
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production || npm i --only=production
|
||||
|
||||
COPY . .
|
||||
# Overwrite static with built SPA
|
||||
COPY --from=frontend /frontend/dist /app/public
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "index.js"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user