fix: changed to production with nginx serving the files
This commit is contained in:
@@ -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
20
sysadmin_panel/Dockerfile
Normal 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;"]
|
||||
Reference in New Issue
Block a user