Skip to content

Instantly share code, notes, and snippets.

View oguzzarci's full-sized avatar
👋
Focusing

Oğuz Zarcı oguzzarci

👋
Focusing
View GitHub Profile
#!/bin/bash -e
get_machine_arch () {
machine_arch=""
case $(uname -m) in
i386) machine_arch="386" ;;
i686) machine_arch="386" ;;
x86_64) machine_arch="amd64" ;;
arm64) machine_arch="arm64" ;;
aarch64) dpkg --print-architecture | grep -q "arm64" && machine_arch="arm64" || machine_arch="arm" ;;
apiVersion: apps/v1
kind: Deployment
metadata:
name: ssltermination
namespace: work
spec:
replicas: 1
selector:
matchLabels:
app: ssltermination
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
FROM nginx:alpine
COPY . /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d
EXPOSE 80