Hello

Welcome to my pages. I use these pages to write down stuff. I like text. I also like pretty pictures. So here is a picture of a nice car. Campervan

HTTPS with letsencrypt using traefik and docker

Prerequisites A domain name and dns service A host with docker and docker-compose with a public ip (regular VPS) Some knowledge of docker and docker-compose Setting up DNS propagation might take some time, so set your domain first. In your domain settings, set an | DOMAIN | RECORD TYPE | TARGET | | --------------------------- | ----------- | ----------- | | subdomain.example.com | A RECORD | <SERVER-IP> | | *....

May 10, 2021 · 4 min · Ask Blaker

Heroku docker FastAPI

Make sure you have the Heroku CLI and GIT See this repo or the spoiler below: git clone git@github.com:askblaker/fastapi-docker-heroku.git cd fastapi-docker-heroku heroku create <your-app-name> heroku git:remote <your-app-name> heroku stack:set container git push heroku main Enjoy your api at https://your-app-name.herokuapp.com

November 3, 2020 · 1 min · Ask Blaker

Docker-compose with ufw-docker in Ubuntu 20.04

Problem During development using docker-compose on Ubuntu, I realized something weird was happening with my UFW. It just did not work as it should. Publishing ports in docker-compose just overrid any UFW settings, and I was no longer able to use UFW to control the traffic. You could say that if you expose a port, the purpose is to keep it open, but sometimes I still want to use a firewall to open/close port access, without disturbing the running services....

November 2, 2020 · 1 min · Ask Blaker

Hardening Ubuntu

This is a short list, largely borrowed from digitalocean Log in with your provided root credentials ssh root@123.123.123.123 Create a user (just hit enter and skip the info if you want) adduser username Enable the user to use sudo usermod -aG sudo username Disable root SSH login nano /etc/ssh/sshd_config Modify the file like below. Pick a high port number between 1024 and 34627. Hit ctrl-x, ‘Y’ and finally hit enter to save....

November 1, 2020 · 2 min · Ask Blaker

Jekyll with Docker, Nginx and Traefik

Prerequisites A hardened VPS A domain with dns service. (Forward example.com to your vps ip) Jekyll > sudo apt-get install ruby-full build-essential zlib1g-dev > echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc > echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc > echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc > source ~/.bashrc > sudo gem install jekyll bundler > cd jekyll-directory > sudo bundle install > jekyll build A nice theme. This is, and I recommend: minimal-mistakes A folder structure like this: ....

November 1, 2020 · 2 min · Ask Blaker