feat(deploy): Add 1Panel deployment configuration
- Add Docker Compose stack for single-server 1Panel deployments - Add backend and frontend Dockerfiles for 1Panel builds - Add Nginx and RocketMQ configuration for container orchestration - Document required environment variables and deployment steps
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
FROM node:20-alpine AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --prefer-offline --no-audit
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG VITE_API_BASE_URL=/api/admin
|
||||
ARG VITE_MEDIA_BASE_URL=/media/video-platform
|
||||
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
|
||||
ENV VITE_MEDIA_BASE_URL=${VITE_MEDIA_BASE_URL}
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
COPY deploy/nginx.1panel.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
Reference in New Issue
Block a user