ci: trigger deploy after SSH config fix
Some checks failed
Deploy Canina / deploy (push) Failing after 1s

This commit is contained in:
DevOps 2026-07-13 13:13:52 +00:00
parent f4dea1f1b0
commit a5b1b31ef8
6 changed files with 18 additions and 28 deletions

View File

@ -1,7 +1,5 @@
node_modules
# dist
.env
.git
.dockerignore
Dockerfile
backend

View File

@ -17,3 +17,4 @@ jobs:
ssh-keyscan -p 2234 -H 172.17.0.1 >> ~/.ssh/known_hosts
- name: Deploy
run: ssh -p 2234 devops@172.17.0.1 'bash /opt/services/scripts/depcanina.sh main'
# Trigger CI

View File

@ -2,7 +2,7 @@ FROM node:22-alpine AS app-builder
RUN apk add --no-cache openssl
WORKDIR /app
COPY frontend/application/package*.json ./
RUN npm ci
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
COPY frontend/application ./
RUN npm run build
@ -10,15 +10,16 @@ FROM node:22-alpine AS admin-builder
RUN apk add --no-cache openssl
WORKDIR /app
COPY frontend/admin-panel/package*.json ./
RUN npm ci
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
COPY frontend/admin-panel ./
RUN npm run build
FROM nginxinc/nginx-unprivileged:alpine
WORKDIR /usr/share/nginx/html
COPY --from=app-builder /app/.next ./.next
COPY --from=app-builder /app/public ./public
COPY --from=admin-builder /app/dist ./admin
COPY nginx.conf /etc/nginx/conf.d/default.conf
FROM node:22-alpine
RUN apk add --no-cache nginx
WORKDIR /app
COPY --from=app-builder /app .
COPY --from=admin-builder /app/dist ./admin_static
COPY nginx.conf /etc/nginx/http.d/default.conf
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
CMD ["sh", "-c", "nginx && npm start"]

View File

@ -1,4 +1,3 @@
node_modules
dist
.env
.git

View File

@ -1,28 +1,19 @@
FROM node:22-alpine AS builder
RUN apk add --no-cache openssl
WORKDIR /app
COPY package*.json ./
RUN npm ci
RUN npm config set registry http://registry.parsaaghayi.ir/repository/npm-proxy/ && npm ci
COPY . .
RUN npx prisma generate && npm run build
FROM node:22-alpine
RUN apk add --no-cache openssl
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/backend/prisma ./prisma
COPY --from=builder /app/frontend/application/lib/data/scientificTerms.ts ./prisma/scientificTerms.ts
EXPOSE 3000
USER node
CMD ["node", "dist/main"]
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]

View File

@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite --port 5050 --host 127.0.0.1",
"build": "tsc -b && vite build",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview"
},