dcppc / uncle-archie

Uncle Archie is a home-brewed continuous integration server for pull request checks and push-to-deploy functionality. https://pages.charlesreid1.com/uncle-archie
Other
1 stars 0 forks source link

add hosting of htdocs directory during private www build tests #37

Closed charlesreid1 closed 5 years ago

charlesreid1 commented 5 years ago

Add hosting of htdocs directory in addition to hosting of log directory when running private-www build tests.

We also need to add simple username/password authentication with nginx on Uncle Archie (this is in the uncle-archie repo, so that is part of this pull request). Don't involve Heroku or Github logins, use nginx and keep it simple.

charlesreid1 commented 5 years ago

~Oh yeah - we also need to fix this nonsense with "error" or "exception" in a commit message borking Uncle Archie. That's pretty annoying...~ (done)

~(Can just strip out the commit message verbatim, wherever it is, from the lower-cased string being checked for "error" or "exception")~ (done)

charlesreid1 commented 5 years ago

~The existing URL schema for output docs is too complicated, make it easier for nginx to filter. Use URL schema below:~ (done)

mkdocs build output logs: https://archie.nihdatacommons.us/output/logs/private_www_build_XXXXXXXX.log

mkdocs build output static content: https://archie.nihdatacommons.us/output/htdocs/private_www_build_XXXXXXXX/

charlesreid1 commented 5 years ago

We added a script to create an nginx username/password combination to the repo.

We merged branch stuff into branch dcppc, then merged branch dcppc into branch add-htdocs-hosting.

We checked out add-htdocs-hosting on beavo as user florence.

We created the .htaccess file and updated the nginx config file.

We copied the nginx config file into place:

sudo cp archie.conf /etc/nginx/sites-available/archie.nihdatacommons.conf

We activated the new nginx configuration:

sudo ln -fs /etc/nginx/sites-available/archie.nihdatacommons.conf /etc/nginx/sites-enabled/archie.nihdatacommons.conf

We restarted nginx:

sudo service nginx restart

We tested out creating a hello world page in /www/archie.nihdatacommons.us/htdocs/output/htdocs/index.html:

echo '<h2>hallo waerld</h2>' > /www/archie.nihdatacommons.us/htdocs/output/htdocs/index.html

We had a 403 permissions problem, caused by a problem with the script that created the .htaccess file (it did not put it in the right final location). Once that was fixed, we could access the hello world page in /www/archie.nihdatacommons.us/htdocs/output/htdocs/index.html successfully after authenticating with nginx.

In short - this is ready to go.

charlesreid1 commented 5 years ago

It should be noted that currently this pull request only modifies the private-www build test to build a copy of the site. That's our initial target, so no problem. But we also want to do this for the four-year-plan and use-case-library.

yammasnake commented 5 years ago

Oh hey guys wutcha doin, can I help, I don't know what I'm doing but let me help

charlesreid1 commented 5 years ago

sheesh... you two...

charlesreid1 commented 5 years ago

Note - we also need a script that will update site_url to the htdocs test URL

charlesreid1 commented 5 years ago

^^^ that script is gonna need to be in the private-www build test... since we have to change the private-www mkdocs.yml before building

charlesreid1 commented 5 years ago

See #39