Compare commits

..

5 Commits
main ... k8s

Author SHA1 Message Date
John Doe
b2df8f5895 some k8s stuff 2023-02-13 18:13:10 -05:00
John Doe
43535c3e2c reworded and added links to some services 2023-02-13 18:12:18 -05:00
John Doe
635276f04a updated docker-compose md 2023-02-13 18:11:57 -05:00
4fda5c188a got kubernetes working :) 2023-01-23 14:39:26 -05:00
419712115a made kubernetes files woooo 2023-01-21 16:43:27 -05:00
6 changed files with 58 additions and 13 deletions

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM rust:latest
RUN cargo install mdbook
RUN apt-get update && apt-get install -y vim git
COPY ./blog /mdbook/
WORKDIR /mdbook
EXPOSE 3000
CMD mdbook serve -n 0.0.0.0

25
blog-deploy.yaml Normal file
View File

@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: blog-dep
namespace: blog
labels:
app: blog-dep
spec:
replicas: 2
selector:
matchLabels:
app: blog-dep
template:
metadata:
labels:
app: blog-dep
spec:
containers:
- name: mdblog
image: docker.scalz.cloud/blog
ports:
- containerPort: 3000
imagePullSecrets:
- name: registry-credential

View File

@ -1,3 +1,8 @@
# Dockerfile Cheat Sheet # Docker Compose Cheat Sheet
Coming soon... Coming soon...
In the mean time, check out:
- [devhints cheat sheet](https://devhints.io/docker-compose)
- [The official Docker docs](https://docs.docker.com/compose/compose-file/compose-file-v3/)

View File

@ -1,5 +1,10 @@
# Home # Home
This is my blog, I post intersting stuff on here sometimes I guess. This is my blog, I try to post interesting and helpful stuff on here!
Check out my different write ups! Check out my different write ups!
[Gitea](https://gitea.scalz.cloud)
[Speedtest](https://speedtest.scalz.cloud)

View File

@ -1,11 +0,0 @@
services:
mdbook:
image: peaceiris/mdbook
container_name: mdbook
volumes:
- "./blog:/mdbook"
ports:
- 80:3000
restart: always
entrypoint: ['/usr/bin/mdbook', 'serve', '/mdbook', '-n', '0.0.0.0']

9
force_update.sh Executable file
View File

@ -0,0 +1,9 @@
#! /bin/sh
# You can use this script to force kubernetes to update to the latest image
# Looking for a better way to do this...
DEPLOYMENT_NAME=blog-dep
kubectl patch deployment $DEPLOYMENT_NAME -p \
'{"spec":{"template":{"spec":{"terminationGracePeriodSeconds":30}}}}' -n blog
kubectl patch deployment $DEPLOYMENT_NAME -p \
'{"spec":{"template":{"spec":{"terminationGracePeriodSeconds":60}}}}' -n blog