################################################### Setup a New Documentation Site ################################################### .. _Brad Stancel: https://bradstancel.com/ .. |date| date:: %m/%d/%Y :Authors: `Brad Stancel`_ :Created: 04/10/2022 :Modified: |date| .. _doc-system-new-doc-site-setup-overview: *************************************************** Steps to Setup a New Documentation Site *************************************************** 1. Run cookiecutter script to create new local folder to house everything 2. Update the conf.py file that was created 3. Perform an initial git commit locally 4. Create a Github private repo as a remote and push the initial commit 5. Setup a site on the Documentation Server 6. Add the needed DNS Records for a site domain or subdomain 7. Setup Deploybot to automatically update the site when Github receives new commits ========================================================================= Run cookiecutter script to create new local folder to house everything ========================================================================= I have a bash script that makes it a bit easier to create a new documentation site. A copy of the script can be downloaded here. To use the script: download it, make sure it is executable, ideally in your PATH and then run it as seen below: .. code-block:: bash setup-new-documentation-site.sh /path/to/new/site | ========================================================================= Update the conf.py file that was created ========================================================================= Make sure that the ``conf.py`` file has the following info: To be updated later git remote add origin git@github.com:ProcessFast/opsinsights-sqlwriters-documentation.git git push -u origin master ~/DevOps/Ansible_Playbooks/projects/opsinsight-documentation-webserver # Destination Path /var/www/connect # Run commands after new version is uploaded rm -rf /var/www/connect/current make clean make html # Run commands after new version becomes active chown -R connect:www-data /var/www/connect/deploy-cache chown -R connect:www-data /var/www/connect/releases chown -R connect:www-data /var/www/connect/shared chown -R connect:www-data /var/www/connect/current find /var/www/connect/deploy-cache -type d -exec chmod -c 2755 {} \; find /var/www/connect/deploy-cache -type f -exec chmod -c 0640 {} \; find /var/www/connect/releases -type d -exec chmod -c 2755 {} \; find /var/www/connect/releases -type f -exec chmod -c 0640 {} \; find /var/www/connect/shared -type d -exec chmod -c 2755 {} \; find /var/www/connect/shared -type f -exec chmod -c 0640 {} \; find /var/www/connect/current -type d -exec chmod -c 2755 {} \; find /var/www/connect/current -type f -exec chmod -c 0640 {} \; # Destination Path /var/www/reportwriters # Run commands after new version is uploaded rm -rf /var/www/reportwriters/current make clean make html # Run commands after new version becomes active chown -R reportwriters:www-data /var/www/reportwriters/deploy-cache chown -R reportwriters:www-data /var/www/reportwriters/releases chown -R reportwriters:www-data /var/www/reportwriters/shared chown -R reportwriters:www-data /var/www/reportwriters/current find /var/www/reportwriters/deploy-cache -type d -exec chmod -c 2755 {} \; find /var/www/reportwriters/deploy-cache -type f -exec chmod -c 0640 {} \; find /var/www/reportwriters/releases -type d -exec chmod -c 2755 {} \; find /var/www/reportwriters/releases -type f -exec chmod -c 0640 {} \; find /var/www/reportwriters/shared -type d -exec chmod -c 2755 {} \; find /var/www/reportwriters/shared -type f -exec chmod -c 0640 {} \; find /var/www/reportwriters/current -type d -exec chmod -c 2755 {} \; find /var/www/reportwriters/current -type f -exec chmod -c 0640 {} \;