Dotfiles scripts remove much of the day today friction. Here are the different scripts explained:
~/dotfiles/scripts/link-dotfiles.bashis the script that will link all the dot files in dotfiles to the current user's dot files (keeping a backup of the existing ones). To do that you need to:
# make it executable chmod +x ~/dotfiles/scripts/link-dotfiles.bash # execute it ~/dotfiles/scripts/link-dotfiles.bash
alias-script, whenever you create a new script, and you want to use it as an alias, you can call this very simple script by specifying the name of your script file relative to
dotfiles/scriptsfolder and the intended script alias.
docker-build-pushthis lets you build the
Dockerfilein the current directory with a tag, and immediately push it to the registry.
It encapsulates two very simple commands, but it's the awaiting between the first and the second that makes them a nightmare to run manually
docker-restart-service, restart a docker-compose service. IMPORTANT, it only works if you follow a directory structure where the service that you want to restart is located in
$ws/some-name, and you pass
some-nameto this command, to let it go to the dir and restart the service whose
docker-composefile is in
$ws/some-namedir. So make sure to have the
$wsvariable pointing to your workspace. NOTE it is internally used by
git-pushup. NOTE the actual
some-namedoes not matter so much to
docker, since the actual name for the service will be picked up from
docker-compose.yml, so if they do not match it is not a biggie.
docker-restart-service -d some-name
flush-startis a very specialized script which only works for a few specific services in my machine.
git pushand restart the service whose docker-compose.yml file lives in directory
$ws/some-name. IMPORTANT it uses
docker-restart-serviceinternally for that matter, read about it for the directory structure.