my personal website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Johan Vandegriff 43643ae24b
added RSS button to blog & featured
8 hours ago
archetypes initial files (modified from old site) 1 month ago
content added link to resume template 18 hours ago
layouts moved social icons to hugo template 17 hours ago
static added RSS button to blog & featured 8 hours ago
themes/hugowncast added RSS button to blog & featured 8 hours ago
.gitignore initial files (modified from old site) 1 month ago
LICENSE initial files (modified from old site) 1 month ago added RSS button to blog & featured 8 hours ago also remove old files when building gallery 1 month ago
config.toml combined both halves of index.html to be on hugo only 1 week ago initial files (modified from old site) 1 month ago

my personal website

For more info on the process and reasoning behind it, see this blog post.

main setup

$ cd ~/git/johanvandegriff/hugowncast/
$ docker build . -t johanvandegriff/hugowncast:build1
$ docker login -u johanvandegriff #paste in key from
$ docker push johanvandegriff/hugowncast:build1

$ cd ~/git/johanvandegriff/multistream
$ docker build . -t johanvandegriff/multistream:build1
$ docker push johanvandegriff/multistream:build1

$ cat <<EOF >> ~/.ssh/config

	User rancher
	IdentityFile ~/.ssh/digitalocean

$ ssh
[rancher@johanv ~]$ docker network create johanvnet
[rancher@johanv ~]$ docker run --name www -d --restart unless-stopped --net johanvnet -v ~/owncast-data:/app/data -v ~/hugo:/app/hugo -it johanvandegriff/hugowncast:build11
[rancher@johanv ~]$ docker run --name caddy -d --restart unless-stopped --net johanvnet -p 80:80 -p 443:443 -v ~/Caddyfile:/etc/caddy/Caddyfile -v ~/caddy-data:/data caddy
[rancher@johanv ~]$ docker run --name rtmp -d --restart unless-stopped --net johanvnet -p 1935:1935 -v ~/rtmp:/srv johanvandegriff/multistream:build2
[rancher@johanv ~]$ sudo chown rancher:rancher -R ~
[rancher@johanv ~]$ exit

$ mkdir ~/sshfs/
$ sshfs ~/sshfs/

# now we can edit the site locally :]
$ cd ~/sshfs/
$ hugo new blog/
$ nano content/blog/

$ cd ~/sshfs/
$ nano secret-dlive.env secret-nginx.conf secret-owncast.env secret-twitch.env secret-youtube.env
#or copy them from the old site
#make sure secret-nginx.conf is empty, because we are not using this for rtmp, just chat fwd
$ ssh docker restart chat-fwd

$ cd ~/sshfs/
$ cat <<EOF >> Caddyfile
} {
        reverse_proxy www:8080
} {
        redir{uri} html
} {
        reverse_proxy chat-fwd:8080
$ ssh docker restart caddy
$ docker stop www
$ rsync -aP --itemize-changes --delete ~/git/johanvandegriff/
$ docker start www

more stuff

docker run --name m2m2m -d --restart unless-stopped --net johanvnet johanvandegriff/m2m2m:build1
docker run --name games -d --restart unless-stopped --net johanvnet -v ~/games:/srv johanvandegriff/games:build7
docker run --name games-mongodb -d --restart unless-stopped --net johanvnet -v ~/games-mongodb:/data/db mongo
docker run --name asciiradio -d --restart unless-stopped --net johanvnet -p 1337:1337 -p 1338:1338 johanvandegriff/asciiradio:build2

Caddyfile: {
	reverse_proxy m2m2m:80
} {
	reverse_proxy games:5000
} {
	reverse_proxy asciiradio:8080

Importing MongoDB Data

echo -n 'mongodb://games-mongodb:27017/boggle' > games/boggle/mongodb-url.txt

scp backup/boggle-mongodb-backup.json
sudo mv boggle-mongodb-backup.json games-mongodb/
docker exec -it games-mongodb mongoimport --db boggle --collection games --file /data/db/boggle-mongodb-backup.json --jsonArray
sudo rm games-mongodb/boggle-mongodb-backup.json

File upload service

docker run --name files -d --restart unless-stopped --net johanvnet -v ~/files:/tmp /tmp
pw=$(echo -n "password" | sha256sum | cut -f 1 -d ' ')
docker run --name upload -d --restart unless-stopped --net johanvnet -v ~/files:/tmp /tmp --upload-files --overwrite-files --auth johanv:sha256:$pw