fix: changed to production with nginx serving the files

This commit is contained in:
2026-05-08 14:21:17 +03:00
parent 4cbf8986df
commit dcf43d382c
2 changed files with 25 additions and 4 deletions

View File

@@ -10,11 +10,12 @@ services:
- ./data:/app/data
sysadmin_panel:
build: ./sysadmin_panel
build:
context: ./sysadmin_panel
args:
VITE_CLOUD_URL: ${VITE_CLOUD_URL}
ports:
- "5175:5175"
- "5175:80"
restart: unless-stopped
env_file:
- ./sysadmin_panel/.env
depends_on:
- cloud_backend

20
sysadmin_panel/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM node:20-alpine AS builder
ARG VITE_CLOUD_URL
ENV VITE_CLOUD_URL=$VITE_CLOUD_URL
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 5175
CMD ["nginx", "-g", "daemon off;"]