Custom Linux Command to Generate Sites

So I created a Linux command for myself to setup websites rather by hand anymore. What took me 10 to 15 minutes now is just down to less then a minute where I can just pass parameters and go! This
article is a place holder for the documentation and some notes so later if I need to create another command.


How it works...
For the setup I have a setup start out checking for sudo and gain access because I'm going to modify a lot of folders. Taking the users input I add a file in Nginx first in sites-available then link it with sites-enabled. I pass the input in the file to have both the naked domain then the www version. From there its setting up a gitlab task-runner. Later down the road I might just convert everything to docker and might not need to setup a folder in /var. However for now I like this setup, so the last step is creating and pushing out the web service for the application. For now I do this last part manually because I have to test the package version and environment for now. Docker would fix these but it also forces me to use the same tech on the server and go through apps that I might not have touch for awhile.
The service notes can be found on the Aspnet Dotnet Core Nginx documentation. Really this command is about automating that setup but I do have plans to expand on nodejs.

location: /user/bin

  • site name
  • port
  • folder for /var/APP
    • I separate my apps based on their technology
  • Gitlab (yes or no)
    • then gitlab task-runner token

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql