Dotfiles scripts remove much of the day today friction. Here are the different scripts explained:
-
~/dotfiles/scripts/link-dotfiles.bash
is 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 todotfiles/scripts
folder and the intended script alias. -
docker-build-push
this lets you build theDockerfile
in 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 passsome-name
to this command, to let it go to the dir and restart the service whosedocker-compose
file is in$ws/some-name
dir. So make sure to have the$ws
variable pointing to your workspace. NOTE it is internally used bygit-pushup
. NOTE the actualsome-name
does not matter so much todocker
, since the actual name for the service will be picked up fromdocker-compose.yml
, so if they do not match it is not a biggie.docker-restart-service -d some-name
-
flush-start
is a very specialized script which only works for a few specific services in my machine. -
git-pushup
willgit push
and restart the service whose docker-compose.yml file lives in directory$ws/some-name
. IMPORTANT it usesdocker-restart-service
internally for that matter, read about it for the directory structure.