information needed for .cpanel.yml
-
In general, you can think of the cpanel.yml file as a shell script which will execute when the conditions are right for a deployment. cPanel doesn't do any special clean up before or after a deployment so the previous folder structure will remain for the next run. While you can totally do any deployment strategy you like, I would suggest keeping your repository's working tree a separate thing from the document root where your project is being hosted out of. In the past, I've encountered a strategy where a symlink exists as the document-root of a domain and is then modified as the last step of a deployment to point at a new document root. (I have not done this myself, only that it's a common strategy) Ultimately cpanel.yml is carte blanche! 0 -
Thanks for the info. Using symlink's will work for most but not for the complete project, but it is a its now easy to combine the with bash commands. 0 -
Hello, I am equally just starting with this. How ever my situation is a bit different. I want to know if I can have multiple export deploypaths in one yml file to my different subdomains. Same website different subdomains. Thank you 0 -
Hello, I am equally just starting with this. How ever my situation is a bit different. I want to know if I can have multiple export deploypaths in one yml file to my different subdomains. Same website different subdomains. Thank you
The easiest being to point the second subdomain's document root to the first's. Here's how to do that:- Log into your cPanel account
- Browse to cPanel " Home " Domains " Domains
- Locate the first subdomain whose content you want to _also_ appear at another subdomain
- Copy it's Document Root value into your copy-paste buffer
- Locate the second subdomain where you want your content to also appear
- Paste the document root value from your copy-paste buffer to the document root value of the second subdomain
- Save the subdomain
0
Please sign in to leave a comment.
Comments
4 comments