Adding Dockerfiles
This commit is contained in:
parent
0199036dd0
commit
9c5cfa991e
14
backend/Dockerfile
Normal file
14
backend/Dockerfile
Normal 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
13
frontend/Dockerfile
Normal 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;"]
|
Loading…
x
Reference in New Issue
Block a user