Adding Dockerfiles

This commit is contained in:
Phill Pover 2025-03-27 09:14:09 +00:00
parent 0199036dd0
commit 9c5cfa991e
2 changed files with 27 additions and 0 deletions

14
backend/Dockerfile Normal file
View File

@ -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;"]

13
frontend/Dockerfile Normal file
View File

@ -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;"]