mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-06-27 20:45:35 -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
52
calculator/README.md
Normal file
52
calculator/README.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
# Calculator Project
|
||||
|
||||
## Description
|
||||
|
||||
This project is a web-based calculator application built using HTML, CSS, and JavaScript. It allows users to perform basic arithmetic operations like addition, subtraction, multiplication, and division.
|
||||
|
||||
## Features
|
||||
|
||||
- **Basic Operations:** Perform addition, subtraction, multiplication, and division.
|
||||
- **Clear Functionality:** Clear the display with a press of a button.
|
||||
- **Responsive Design:** Designed to work on various screen sizes.
|
||||
|
||||
## Local Development
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Web browser (e.g., Chrome, Firefox, Safari)
|
||||
|
||||
### Setup
|
||||
|
||||
1. **Clone the repository:**
|
||||
If you haven't already, clone this repository to your local machine.
|
||||
|
||||
2. **Navigate to the project directory:**
|
||||
```
|
||||
bash
|
||||
cd calculator
|
||||
|
||||
```
|
||||
### Running the Project
|
||||
|
||||
1. **Open `index.html`:**
|
||||
- Open the `index.html` file in your web browser.
|
||||
- You can do this by right-clicking the file and selecting "Open with" and then your preferred browser.
|
||||
|
||||
2. **Interact with the Calculator:**
|
||||
- Use your mouse or keyboard to interact with the calculator buttons.
|
||||
- The result will be displayed on the calculator's display area.
|
||||
|
||||
### File Structure
|
||||
```
|
||||
calculator/
|
||||
├── css/
|
||||
│ └── style.css # CSS styles for the calculator
|
||||
├── js/
|
||||
│ └── script.js # JavaScript code for calculator logic
|
||||
├── index.html # Main HTML file
|
||||
└── faviocon.svg # icon
|
||||
```
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request.
|
14
calculator/devops/Dockerfile
Normal file
14
calculator/devops/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Use an official Nginx image as the base image
|
||||
FROM nginx:latest
|
||||
|
||||
# Remove default Nginx files
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
# Copy the project files to the Nginx default directory
|
||||
COPY . /usr/share/nginx/html
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start Nginx when the container starts
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
32
calculator/devops/deployment.yaml
Normal file
32
calculator/devops/deployment.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: calculator-deployment
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: calculator
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: calculator
|
||||
spec:
|
||||
containers:
|
||||
- name: calculator
|
||||
image: ghcr.io/smiggiddy/odin-codeprojects/calculator:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: calculator-service
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: calculator
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
Loading…
Add table
Add a link
Reference in a new issue