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
22
tictactoe/README.md
Normal file
22
tictactoe/README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Tic Tac Toe
|
||||
|
||||
## Description
|
||||
|
||||
This is a simple Tic Tac Toe web application built using HTML, CSS, and JavaScript. Players can take turns marking spaces in a 3x3 grid, and the game will automatically detect a win or a draw.
|
||||
|
||||
## How to Run Locally
|
||||
|
||||
1. **Clone the Repository**
|
||||
If you haven't already, clone the repository to your local machine.
|
||||
|
||||
2. **Open `index.html`**
|
||||
Navigate to the project directory in your file explorer and open the `index.html` file in your web browser.
|
||||
|
||||
3. **Play**
|
||||
You can now play Tic Tac Toe in your browser. Click on the empty cells to make your move.
|
||||
|
||||
## Project Structure
|
||||
|
||||
- `index.html`: The main HTML file for the game.
|
||||
- `css/style.css`: Contains the styling for the game's interface.
|
||||
- `js/main.js`: Contains the JavaScript code for the game logic.
|
13
tictactoe/devops/Dockerfile
Normal file
13
tictactoe/devops/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Use an official Nginx image as the base image
|
||||
FROM nginx:latest
|
||||
|
||||
# Set the working directory to /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the HTML, CSS, and JavaScript files to the Nginx default directory
|
||||
COPY . /usr/share/nginx/html
|
||||
|
||||
# Expose port 80 to allow external access
|
||||
EXPOSE 80
|
||||
|
||||
# The Nginx server will start automatically when the container starts
|
32
tictactoe/devops/deployment.yaml
Normal file
32
tictactoe/devops/deployment.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: tictactoe-deployment
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tictactoe
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: tictactoe
|
||||
spec:
|
||||
containers:
|
||||
- name: tictactoe-container
|
||||
image: ghcr.io/smiggiddy/odin-codeprojects/tictactoe:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: tictactoe-service
|
||||
spec:
|
||||
selector:
|
||||
app: tictactoe
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
Loading…
Add table
Add a link
Reference in a new issue