Why create a symlink when deploying gunicorn
Question
I will be using runit to start my gunicorn server. The following link -
states that the startup script should be created under /etc/sv/[app_name]/run and should be then symlinked to /etc/service/[app_name]/run
What is the purpose of the symlink ? Why not directly create the file in /etc/service/ dir ?
Solution
Symlinks are cheap to create and delete. If you want to deactivate the service, you can delete the symlink. Since the script won't be deleted, it's trivial to restore the service.
If you had to delete the script, restoring the service would mean to reinstall the whole application or at least restore the script from "somewhere."
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow