website/Dockerfile

33 lines
672 B
Text
Raw Normal View History

2024-10-21 12:52:40 -04:00
# Use an official Node.js runtime as a parent image
FROM node:18 AS build
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the application
RUN npm run build
# Use an official Nginx image to serve the built application
FROM nginx:alpine
# Copy the built application from the previous stage
COPY --from=build /app/dist /usr/share/nginx/html
2024-10-25 07:34:44 -04:00
COPY dotechbro_nginx.conf /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/nginx.conf
2024-10-25 03:58:18 -04:00
2024-10-21 12:52:40 -04:00
# Expose port 80
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]