mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-06-28 04:45:36 -04:00
adding devops
used gemini to create the k8s/dockerfiles faster
This commit is contained in:
parent
5c09c5a22f
commit
6c14a968c3
74 changed files with 2061 additions and 16 deletions
38
todo/devops/Dockerfile
Normal file
38
todo/devops/Dockerfile
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Use an official Node.js runtime as the base image
|
||||
FROM node:18-alpine as builder
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json to the working directory
|
||||
COPY package*.json ./
|
||||
|
||||
# Install any needed dependencies
|
||||
RUN npm install
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
|
||||
# Use an official Nginx runtime as the base image
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
# Remove default nginx static files
|
||||
RUN rm -rf ./*
|
||||
|
||||
# Copy static files from the builder stage
|
||||
COPY --from=builder /app/dist .
|
||||
|
||||
# Copy the nginx configuration file
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Command to run when starting the container
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
Loading…
Add table
Add a link
Reference in a new issue