diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..c5f1df5 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,14 @@ +# Build Stage +FROM node:23-alpine +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +COPY .env .env.development ./ +RUN npm run build + +# Production Stage +FROM nginx:stable-alpine AS production +COPY --from=build /app/build /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..03cfcba --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,13 @@ +# Build Stage +FROM node:23-alpine AS build +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# Production Stage +FROM nginx:stable-alpine AS production +COPY --from=build /app/build /usr/share/nginx/html +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"]