Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What:
Creates a docker-compose stack to simplify development onboarding. See primarily the DOCKER.README.md file, and the docker-compose.yml file. Also some tweaks in the API configurations to support this setup, and JSON encoding tweaks in the API code itself to handle Decimal encoding.
Why:
To simplify the onboarding process for new developers.
docker-compose up
will yield a full development stack -- the new developer only needs then to load in data required for development.For the reviewer:
The onboarding process is described in the DOCKER.README.md. I was unable to get functionality in the client working without including 1-year, 5-year, and tiger data, so the documentation reflects this. I did end up truncating 5-year data for sanity and simply due to disk space limitations.
The stack itself is laid out in the docker-compose.yml file. Note that this brings up memcached and localstack (for s3), however the default configuration bypasses the cache as described in the README.
The postgres build is defined by postgres/Dockerfile, and utilizes pg9.6+pgis2.5. I had too much trouble getting the data to load with pg9.5. *sql and *sql.gz files in postgres/data are loaded by initdb (during
docker-compose up
) and are git-ignored.Mostly, the code itself is untouched, so these changes should stand fairly alone. I did make some tweaks to the config.py file, but have tried to maintain previous defaults so as not to break the setup for any current devs. I also added a Decimal encoder for JSON encoding in the API -- it's not clear to me how the current code is working without it and was necessary in order for me to get this up and running.
I have not done a lot of diligence with the client. I have checked the basic auto-fill search function on the main page against some municipalities, and I have poked through some of the categories at the bottom and tried a handful of searches in various categories, but I am not super familiar with usage patterns, so you may surface issues, or have suggestions of patterns/endpoints you want me to check.