Update server configuration and Docker setup for improved deployment

This commit is contained in:
MayaTheShy
2026-03-21 17:15:04 -04:00
parent cc64b568a0
commit 2853ca98a0
4 changed files with 58 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
# Production build with simple HTTP server
FROM node:18-alpine
# Stage 1: Build the React app
FROM node:18-alpine AS build
WORKDIR /app
@@ -11,8 +11,12 @@ COPY . .
RUN npm run build
RUN npm install -g serve
# Stage 2: Serve with nginx
FROM nginx:alpine
EXPOSE 3000
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
CMD ["serve", "-s", "dist", "-l", "3000"]
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]