0cb6a49aa5
- 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
23 lines
451 B
Docker
23 lines
451 B
Docker
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
|