Helm Cheatsheet
Collection of helm-stuff
Collection of helm-stuff
A simple docker command to start MySQL on a tmpfs. Things to note: Mounting localtime affects MySQL server timezone You need to have a my.cnf at the given location ($HOME/docker/mysql/my.cnf) You probably need to create /var/lib/mysql before running the command Setting sql_mode="" is probably not needed for most applications. sudo docker run -d \ --name mysql7 \ -v/usr/share/zoneinfo/Europe/Stockholm:/etc/localtime:ro \ -v$HOME/docker/mysql/my.cnf:/etc/my.cnf \ -e MYSQL_ROOT_PASSWORD=root \ -e MYSQL_ROOT_HOST='%' \ -p3306:3306 \ --mount type=tmpfs,destination=/var/lib/mysql \ mysql/mysql-server:5....
Hugo is a framework for building static webpages. It pairs well with creating a git repository and creating a push-webhook which rebuilds the homepage every time you change it. This post is just documenting how to do just that for an existing hugo repository. Create a static repo with nginx pointing to it Clone a hugo repo and put it in /srv/hugo.iix.se Pop over to the folder and run hugo to generate a static page chown -R nginx:nginx /srv/hugo....
Sometimes when you exec into a docker container normally, the size of the containers terminal will be much smaller than your real screen, making it not work properly. To solve this you need to set COLUMNS and LINES in the containers env: sudo docker exec -e COLUMNS="$(tput cols)" -e LINES="$(tput lines)" -it docker-container bash
This is a very broad title, and will probably not help anyone except for me if this happens for me again. One day when I had to restart my KVM host, none of my guests had internet connection. The eth0 on the KVM host was attached to a bridge (br0) and that host had connectivity through the bridge. Here are some configs (which had not changed since it worked): # /etc/network/interfaces source /etc/network/interfaces....
sudo systemctl stop nginx sudo docker run --rm -it -p80:80 -p443:443 -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" certbot/certbot certonly --expand --standalone -d yolo.iix.se sudo systemctl start nginx
I have docker container which wants access to a drive on its host, which in turn is mounted with cifs from a server on the local network. If you mount it normally with a -v host:container and try to access it from the container, you get an access denied. If you try the old classic SE-Linux-friendly -v host:container:Z, it will look like this from the container: root@c3ada26b1d90:/# l /data/* /data/backup: ls: cannot access '/data/backup/config....
# Restart single instance and refresh image sudo docker-compose up -d --build backend
Backing up stuff to the cloud is all the rage, and I wanted to give it a try. Since I don’t really want to spend any money on it, I decided to go with the best free provider I could find. I haven’t done too much research, but MEGA’s 50 free GB seems to be the best offer around. They also have a simple CLI tool called megatools (manual). Since I couldn’t find megatools in the official debian repo, I decided to use it from docker....
# m h dom mon dow command # SQL Backup (daily) 15 1 * * * docker exec -t iixnotes_database_1 pg_dumpall -U postgres | gzip > /media/stor/backup/iix-notes.daily.psql.gz # SQL Backup (weekly) 15 1 * * 0 docker exec -t iixnotes_database_1 pg_dumpall -U postgres | gzip > /media/stor/backup/iix-notes.weekly.psql.gz # SQL Backup (monthly) 15 1 1 * * docker exec -t iixnotes_database_1 pg_dumpall -U postgres | gzip > /media/stor/backup/iix-notes.monthly.psql.gz