Skip to content

Instantly share code, notes, and snippets.

View emreozcan3320's full-sized avatar

Emre Ozcan emreozcan3320

  • Turkey
View GitHub Profile
@emreozcan3320
emreozcan3320 / kubernetes-deployment.yaml
Last active December 27, 2020 00:22
all-in one deployment file ( loadbalancer, angular, spring boot )
apiVersion: v1
kind: Service
metadata:
name: application-load-balancer-service
spec:
ports:
- name: application-load-balancer-service-port-name
port: 4200
protocol: TCP
targetPort: 4200
@emreozcan3320
emreozcan3320 / load-balancer-kubernetes-deployment.yaml
Created December 22, 2020 23:07
Spring Boot Kubernetes load balancer deployment file
apiVersion: v1
kind: Service
metadata:
name: application-load-balancer-service
spec:
ports:
- name: application-load-balancer-service-port-name
port: 4200
protocol: TCP
targetPort: 4200
@emreozcan3320
emreozcan3320 / angular-kubernetes-sevice-deployment.yaml
Created December 22, 2020 20:28
Spring Boot Kubernetes service deployment file
apiVersion: v1
kind: Service
metadata:
name: application-web-service
spec:
selector:
app: application-web-pod
ports:
- name: application-web-service-port-name
protocol: TCP
@emreozcan3320
emreozcan3320 / spring-boot-kubernetes-sevice-deployment.yaml
Created December 22, 2020 20:25
Spring Boot Kubernetes service deployment file
apiVersion: v1
kind: Service
metadata:
labels:
app: application-api-service
name: application-api-service
spec:
ports:
- name: application-api-service
port: 8080
@emreozcan3320
emreozcan3320 / spring-boot-kubernetes-deployment.yaml
Last active December 29, 2020 11:17
Spring Boot Kubernetes deployment file
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: application-api-deployment
name: application-api-deployment
spec:
replicas: 1
selector:
matchLabels:
@emreozcan3320
emreozcan3320 / angular-kubernetes-deployment.yaml
Last active December 22, 2020 00:01
Angular Kubernetes deployment yaml file
apiVersion: apps/v1
kind: Deployment
metadata:
name: application-web-deployment
spec:
selector:
matchLabels:
app: application-web-pod
replicas: 1
template:
@emreozcan3320
emreozcan3320 / MySql-PhpMyAdmin-SpringBoot-Angular-Docker-Compose.yaml
Last active May 30, 2021 19:41
a docker compose file for MySql, PhpMyAdmin, SpringBoot and Angular CRUD web application
version: "3.3"
#Define services
services:
#MySql Database for application
mysql-db:
image: mysql
restart: always
container_name: mysql-db
@emreozcan3320
emreozcan3320 / Modal.js
Created May 17, 2020 20:34
quote modal for quote app
import React, {useState} from 'react'
import "./Modal.scss"
import {createQuote, updateQuote} from "../../services/Quote.service"
const Modal = (props) => {
const [key, setKey] = useState(props.updatedQuote.key)
const [quote, setQuote] = useState(props.updatedQuote.quote)
const [owner, setOwner] = useState(props.updatedQuote.owner)
const [reference, setReference] = useState(props.updatedQuote.reference)
@emreozcan3320
emreozcan3320 / Quote.service.js
Created May 17, 2020 20:15
api service layer for quote app
import React, { useState } from 'react';
import axios from 'axios';
//const API_URL_DEV = `http://localhost:8080`
const API_URL_CLOUD = `https://golang-web-app-back-end-d6kfnlic2a-uk.a.run.app`
async function listAllQuotes() {
return axios (`${API_URL_CLOUD}/api/quotes`)
}
@emreozcan3320
emreozcan3320 / Dockerfile
Created May 3, 2020 23:11
golang Dockerfile
FROM golang:alpine
# Install git.
# Git is required for fetching the dependencies.
RUN apk update && apk add --no-cache git
RUN mkdir -p /go/src/github.com/emre/react-golang-web-app
# Install dep dependency management
RUN go get -u github.com/golang/dep/cmd/dep