Add personal website

This commit is contained in:
Aram 🍐 2019-10-26 14:01:50 -04:00
commit 27d33fcc41
11 changed files with 339 additions and 0 deletions

2
website/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.idea/
chart/website/manifests/

View file

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: Helm chart for my personal website
name: website
version: 0.1.0

View file

@ -0,0 +1,45 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "website.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "website.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "website.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "website.labels" -}}
app.kubernetes.io/name: {{ include "website.name" . }}
helm.sh/chart: {{ include "website.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

View file

@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "website.fullname" . }}
labels:
{{ include "website.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "website.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "website.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "website.fullname" . }}
labels:
{{ include "website.labels" . | indent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
{{- if (eq .Values.service.type "ClusterIP") }}
nodePort: null
{{- end }}
selector:
app.kubernetes.io/name: {{ include "website.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View file

@ -0,0 +1,15 @@
replicaCount: 1
image:
name: notset
tag: latest
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
service:
type: ClusterIP
port: 9000

View file

@ -0,0 +1,3 @@
FROM nginx:alpine
COPY src/ /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf

18
website/docker/nginx.conf Normal file
View file

@ -0,0 +1,18 @@
server {
listen 80;
server_name localhost;
add_header Content-Security-Policy "default-src 'self'; object-src 'none'; style-src 'self' 'unsafe-inline';
add_header X-Frame-Options "SAMEORIGIN";
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

132
website/src/index.html Normal file
View file

@ -0,0 +1,132 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Aram Peres</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:description" content="Aram Peres: Personal Website">
<meta property="og:site_name" content="Aram Peres">
<meta name="robots" content="index,follow">
<style>
html,
body {
font-family: Arial, Helvetica, sans-serif;
margin: 0;
}
.page-container {
margin: 0 auto;
width: 100%;
max-width: 800px;
}
.headline {
text-align: center;
margin: 20px;
}
.examples {
margin-top: 20px;
margin-left: 85px;
margin-right: 20px;
}
@media only screen and (max-width: 900px) {
.examples {
margin-left: 20px;
}
}
</style>
</head>
<body>
<div class="page-container">
<p class="headline">
Hello, looks like you found my landing page.
</p>
<p class="headline">
My name is Aram (<i>Momo</i>) Peres, I'm a software and web developer based in Ottawa, Canada.
</p>
<p class="headline">
I usually contribute to
<a href="https://github.com/momothereal">open source</a> in my free time.
</p>
<p class="headline">
--
</p>
<div class="examples">
<p>
<strong>Some of my projects:</strong>
</p>
<ul>
<li>
<a href="https://glowstone.net" target="_blank">Glowstone</a> (Java, core developer of open-source, reverse-engineered game server)</li>
<li>
<a href="https://github.com/coop-ctf" target="_blank">COOP-CTF</a> (Organized a Capture-the-Flag competition with 60+ participants)</li>
<li>
<a href="https://wavy.fm" target="_blank">wavy.fm</a> (React + Python + MongoDB + Kubernetes, music social media)</li>
<li>
<a href="https://github.com/momothereal/rmc" target="_blank">rateMyColor</a> (Python + Redis, project speedrun in 4 hours)</li>
<li>
<a href="https://github.com/momothereal/code-jam-1" target="_blank">PythonDiscord code jam #1</a> (Winner, 72-hour Python programming competition)</li>
<li>
<a href="https://github.com/momothereal/code-jam-2" target="_blank">PythonDiscord code jam #2</a> (Winner, 1-week Python programming competition)</li>
<li>
<a href="https://devpost.com/software/post-hop" target="_blank">Post Hop</a> (Angular + Cordova + Python + GCP/GKE, delivery app demo for cuHacking 2019)</li>
<li>
<a href="https://github.com/momothereal/Minesweeper" target="_blank">Minesweeper</a> (Java, Swing implementation of Minesweeper)</li>
</ul>
<p>
<strong>Libraries:</strong>
</p>
<ul>
<li>
<a href="https://github.com/momothereal/Pathfinder" target="_blank">Pathfinder</a> (Java, A* implementation)</li>
<li>
<a href="https://github.com/momothereal/Mojangson" target="_blank">Mojangson</a> (Java, JSON variant parsing library)</li>
<li>
<a href="https://github.com/momothereal/OneLineReflection" target="_blank">OneLineReflection</a> (Java, string reflection utility)</li>
</ul>
<p>
<strong>Other contributions:</strong>
</p>
<ul>
<li>
<a href="https://pythondiscord.com" target="_blank">Python Discord</a> (Python, website + Discord bot)</li>
<li>
<a href="https://github.com/sindresorhus/refined-github" target="_blank">Refined GitHub</a> (JS, browser extension)</li>
<li>
<a href="https://github.com/withspectrum/spectrum" target="_blank">Spectrum</a> (JS, network for online communities)</li>
<li>
<a href="https://github.com/spring-cloud/spring-cloud-openfeign" target="_blank">Spring Cloud OpenFeign</a> (Java, Spring support for OpenFeign)</li>
<li>
<a href="https://github.com/caelunshun/feather" target="_blank">Feather</a> (Rust, experimental clean-room server software for Minecraft)</li>
</ul>
</div>
<p class="headline">
--
</p>
<div class="examples">
<p>
<strong>Reach me:</strong>
</p>
<ul>
<li>
<a href="https://github.com/momothereal" target="_blank">GitHub</a> / <a href="https://gitlab.com/momothereal" target="_blank">GitLab</a> (@momothereal)</li>
<li>
<strong>Email</strong> (<u>contact <i>at</i> aramperes.ca</u>)</li>
<li>
<a href="https://www.linkedin.com/in/aram-peres/" target="_blank">LinkedIn</a> (Aram Peres)</li>
</ul>
</div>
</div>
</body>
</html>