├── Dockerfile ├── KubernetesDeployment ├── services.yaml └── deployment.yaml ├── icons ├── dark.svg └── light.svg ├── README.md └── index.html /Dockerfile: -------------------------------------------------------------------------------- 1 | # Creating server with nginx image from dockerhub 2 | FROM nginx:alpine 3 | 4 | # Copy all info on html container server 5 | COPY . /usr/share/nginx/html 6 | 7 | # Expose on port 80 8 | EXPOSE 80 9 | # NGINX INCLUDES CMD TO RUN .html not necesary 10 | #This dockerfile is created to test env 11 | -------------------------------------------------------------------------------- /KubernetesDeployment/services.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: my-nginx-service 5 | spec: 6 | selector: 7 | app: my-nginx 8 | type: NodePort # Expose port on local. 9 | ports: 10 | - protocol: TCP 11 | port: 80 # External Port 12 | targetPort: 80 # Port from container 13 | nodePort: 30080 #External Port to localhost acces 14 | -------------------------------------------------------------------------------- /icons/dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /icons/light.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /KubernetesDeployment/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: my-nginx-deployment 5 | spec: 6 | replicas: 3 # Number of replicas 7 | selector: 8 | matchLabels: 9 | app: my-nginx 10 | template: 11 | metadata: 12 | labels: 13 | app: my-nginx 14 | spec: 15 | containers: 16 | - name: my-nginx-container 17 | image: pamblo/nginx:osiristape # Image we tested on Dockerfile 18 | ports: 19 | - containerPort: 80 # Port open from container 20 | --- 21 | apiVersion: autoscaling/v2 22 | kind: HorizontalPodAutoscaler 23 | metadata: 24 | name: my-nginx-hpa 25 | spec: 26 | scaleTargetRef: 27 | apiVersion: apps/v1 28 | kind: Deployment 29 | name: my-nginx-deployment 30 | minReplicas: 3 31 | maxReplicas: 10 32 | metrics: 33 | - type: Resource 34 | resource: 35 | name: cpu 36 | target: 37 | type: Utilization 38 | averageUtilization: 50 # Scale on 50% of cpu consumed resources... Max 10 conteiners. 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notes Application 2 | 3 | This is a simple notes application that allows users to create, edit, and delete notes. The application is built using basic web technologies such as HTML, CSS, and JavaScript, and is deployed as a dynamic website. 4 | 5 | > This application also provides theme toggling 6 | 7 | #### Link: https://8ORUZ7.github.io/notes-application/ 8 | 9 | ## Features 10 | 11 | - **Create Notes**: Add new notes easily. 12 | - **Edit Notes**: Modify existing notes. 13 | - **Delete Notes**: Remove notes that are no longer needed. 14 | - **Responsive Design**: Works well on both desktop and mobile devices. 15 | - **Docker&Kubernetes**: You can deploy your app on a minikube cluster to practice deployment 16 | 17 | ## Installation 18 | 19 | ### 1. Clone the Repository 20 | 21 | First, clone the repository to your local machine using Git: 22 | 23 | ``` 24 | git clone https://github.com/8ORUZ7/notes-application.git 25 | ``` 26 | 27 | ### 2. Navigate to the Project Directory 28 | 29 | ``` 30 | cd notes-application 31 | ``` 32 | 33 | ### 3. Open in Browser 34 | 35 | Since this is a static website, you can simply open the index.html file in your browser: 36 | 37 | ``` 38 | open index.html 39 | ``` 40 | 41 | ### 4. Optional deployment 42 | 43 | You can apply a kubectl deployment and services and test in localhost:80 44 | 45 | `` 46 | cd /KubernetesDeployment 47 | kubectl apply -f deployment.yaml 48 | kubectl apply -f services.yaml 49 | minikube services my-nginx-service 50 | `` 51 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Notes 8 | 92 | 93 | 94 | 95 |

notes.

96 |

double click on a note to remove it.

97 |
98 | 99 |
100 | 194 | 195 | 196 | --------------------------------------------------------------------------------