adding devops

used gemini to create the k8s/dockerfiles faster
This commit is contained in:
Smigz 2025-05-02 16:47:07 +00:00
parent 5c09c5a22f
commit 6c14a968c3
74 changed files with 2061 additions and 16 deletions

20
signup_form/README.md Normal file
View file

@ -0,0 +1,20 @@
# Signup Form Project
## Description
This project is a simple web-based signup form. It's built using HTML for structure, CSS for styling, and JavaScript for interactivity. The form allows users to enter their personal information and submit it.
## How to View Locally
1. **Open `index.html`:** Navigate to the project directory in your file explorer and open the `index.html` file in your preferred web browser.
2. **View in browser**: The page should automatically load.
## Project Structure
* `index.html`: The main HTML file containing the structure of the form.
* `css/style.css`: The CSS file for styling the form.
* `js/script.js`: The JavaScript file that handles form interactivity.
* `static/`: contains static files like images.
## Notes
The form does not include backend code to save data.

View file

@ -0,0 +1,17 @@
# Use an official Nginx image as the base image
FROM nginx:latest
# Set the working directory to /app inside the container
WORKDIR /app
# Copy the HTML, CSS, and JavaScript files from the current directory to /app
COPY . /app
# Copy the Nginx configuration file to /etc/nginx/conf.d/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80 for HTTP traffic
EXPOSE 80
# Command to run when the container starts
CMD ["nginx", "-g", "daemon off;"]

View file

@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: signup-form-deployment
spec:
replicas: 3
selector:
matchLabels:
app: signup-form
template:
metadata:
labels:
app: signup-form
spec:
containers:
- name: signup-form
image: ghcr.io/smiggiddy/odin-codeprojects/signup-form:latest
ports:
- containerPort: 80
imagePullPolicy: IfNotPresent
---
apiVersion: v1
kind: Service
metadata:
name: signup-form-service
spec:
selector:
app: signup-form
type: LoadBalancer
ports:
- protocol: TCP
port: 80
targetPort: 80