Simplify
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -4,7 +4,7 @@ FROM node:20-alpine as build
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package.json and package-lock.json (if present) to leverage Docker cache
|
# Copy package.json and package-lock.json (if present) to leverage Docker cache
|
||||||
COPY package.json yarn.lock* package-lock.json* ./
|
COPY package.json package-lock.json* ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install
|
RUN npm install
|
||||||
@@ -17,19 +17,10 @@ COPY . .
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Serve the built application with Nginx
|
# Stage 2: Serve the built application with Nginx
|
||||||
FROM nginx:alpine
|
FROM nginx:latest
|
||||||
|
|
||||||
# Copy the built Vite application from the build stage to Nginx's web root
|
# Copy the built Vite application from the build stage to Nginx's web root
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
# Remove the default Nginx configuration file
|
|
||||||
RUN rm /etc/nginx/conf.d/default.conf
|
|
||||||
|
|
||||||
# Copy a custom Nginx configuration file (see example below)
|
|
||||||
COPY nginx.conf /etc/nginx/conf.d/nginx.conf
|
|
||||||
|
|
||||||
# Expose port 80 for web traffic
|
# Expose port 80 for web traffic
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# Start Nginx when the container launches
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2025 Theo Browne
|
Copyright (c) 2025 Joshua Higgins
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
Reference in New Issue
Block a user