Establishes a containerized development and production environment. Creates Dockerfiles, docker-compose configurations, and associated scripts. Prioritizes easy setup, dependency isolation, and platform consistency. Enhances dev experience and simplifies deployment.
13 lines
296 B
Docker
13 lines
296 B
Docker
# Production runtime image; 前端已在宿主机构建(Makefile: build)
|
||
FROM nginx:1.27-alpine
|
||
|
||
# 拷贝 nginx 配置,启用 SPA fallback
|
||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||
|
||
# 拷贝构建产物
|
||
COPY dist/ /usr/share/nginx/html/
|
||
|
||
EXPOSE 80
|
||
CMD ["nginx", "-g", "daemon off;"]
|
||
|
||
|