cfpb / cfpb.github.io

A site for the CFPB to share and discuss its technology work with the world.
https://cfpb.github.io/
Creative Commons Zero v1.0 Universal
363 stars 99 forks source link

Build docker-compose functionality for easier set-up #257

Closed cooldragontattoo closed 2 years ago

cooldragontattoo commented 2 years ago

This PR includes the mechanics for using docker-compose to get the application up and running.

Aside from adding the Dockerfile and docker-compose.yaml, changes were made to the .Gemfile. I removed the requirements for json and uni-open, and added in a new gem for webrick (please see this similar GitHub issue for why I did that). Removing json and uni-open did not impair functionality and I am hoping that someone can clarify whether or not they are, indeed, required.

The reason they were removed is due to this error:

#10 3.745 [!] There was an error parsingGemfile`: No such file or directory @ rb_sysopen - https://pages.github.com/versions.json. Bundler cannot continue.

10 3.745

10 3.745 # from /usr/src/app/Gemfile:6

10 3.745 # -------------------------------------------

10 3.745 # require 'open-uri'

10 3.745 > versions = JSON.parse(open('https://pages.github.com/versions.json').read)

10 3.745

10 3.745 # -------------------------------------------`

It appears, based off of this intel, that there is an issue with jekyll and gem building inside a docker container due to environmental variable confusions. Please note, I did attempt numerous solutions that I stumbled across and none of them eradicated the error or constructed a functional container. Thus, I removed, and everything appears to be running smoothly.

Moreover, I re-wrote the instructions for the README.md. I am unsure if they are too vague/need to be more detailed? The reason I removed the previous ones is because they didn't work on my CFPB Mac.