config for dev work on torcrm
A suggestion for how we can handle dev sites/instances on crm-int-01
As we do dev work and bug fixes, I'd like to be able to easily setup and take down dev instances. With the current permissions, that would require tickets to be submitted and config files to be created/deleted by you. To minimize the annoyance here is what I suggested to anarcat via email.
Change of plans.
Realized that I'd need a lot of your help since I don't have the ability to create the new directories in /srv.
We can revisit that later, not worth putting in the effort now since we have other things to sort.
For the live and stage sites, we'll leave it all as is for now.
Let me know if you have any issues with this idea: For our dev work, I'm going to create site instances in the /srv/openflows/torcrm directory
If we can setup a wildcard SSL Cert from Let's Encrypt and use a wildcard DNS entry (*.torcrm.openflows.com, for example), then I can spin up and destry dev instances as needed. In the example that follows, creating a working site directory /srv/openflows/torcrm/thisFeatureBranch would become accessible at thisFeatureBranch.torcrm.openflows.com
I think this would be the quickest way to get from where we are now to us having everything we need to fix bugs and do development work.
--Eric
Config example based on another dev machine follows:
<VirtualHost *:80>
ServerAdmin info@openflows.com
ServerName torcrm.openflows.com
ServerAlias *.torcrm.openflows.com
VirtualDocumentRoot /srv/openflows/torcrm/%1
CustomLog /var/log/apache2/%1.torcrm.openflows.access.log combined
ErrorLog /var/log/apache2/%1.torcrm.openflows.error.log
<Directory /srv/openflows/torcrm >
AllowOverride all
Options ExecCGI FollowSymLinks
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php7.3-fpm.sock|fcgi://localhost/"
</FilesMatch>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin info@openflows.com
ServerName torcrm.openflows.com
ServerAlias *.torcrm.openflows.com
VirtualDocumentRoot /srv/openflows/torcrm/%1
CustomLog /var/log/apache2/%1.torcrm.openflows.access.log combined
ErrorLog /var/log/apache2/%1.torcrm.openflows.error.log
<Directory /srv/openflows/torcrm >
AllowOverride all
Options ExecCGI FollowSymLinks
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php7.3-fpm.sock|fcgi://localhost/"
</FilesMatch>
SSLEngine On
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder on
###### TOR Standard SSL Settings go here
SSLCertificateFile /etc/letsencrypt/live/torcrm.openflows.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/torcrm.openflows.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/torcrm.openflows.com/chain.pem
</VirtualHost>