-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating README and local config #4211
base: qat
Are you sure you want to change the base?
Conversation
…api into update-readme-steps
# NOTE: The .env file is used to provide environment variable values that replace variables in the compose file | ||
# Because the .env file does not live in the same place as the compose file, we have to tell compose explicitly | ||
# where it is with "--project_directory". Since this is called from the root Makefile, using ./ points to the dir | ||
# of that Makefile | ||
docker-compose ${profiles} --project-directory . --file ${docker_compose_file} ${args} | ||
docker compose ${profiles} --project-directory . --file ${docker_compose_file} ${args} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we remove the - between docker compose? I have historically always used docker-compose. Is there a difference? For example: docker-compose up usaspending-db usaspending-es
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayubshahab Recent updates to docker
have added compose
as a sub-command of docker
itself instead of being a standalone executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayubshahab here is the doc to help explain: https://docs.docker.com/compose/releases/migrate/
@sethstoudenmier What do you think about adding an
|
Funny you should say that, I actually had that in place originally. The problem is that it conflicts with the Travis CI/CD build process when we use the |
Ahh.. that makes sense with the CI/CD process. I missed the changes to the README, because it was collapsed. I'm happy with those steps being documented! |
…ncy/usaspending-api into update-readme-steps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
RUN yum -y groupinstall "Development Tools" | ||
# Install dependencies | ||
RUN apt update && \ | ||
apt install -y coreutils gcc wget openssl libssl-dev libbz2-dev build-essential |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apt install -y coreutils gcc wget openssl libssl-dev libbz2-dev build-essential | |
apt install -y coreutils gcc wget openssl libssl-dev libbz2-dev build-essential curl |
@@ -259,10 +263,10 @@ services: | |||
|
|||
spark-worker: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found I had to add the following environmental variables to the spark worker:
PYTHONPATH: /project
DJANGO_SETTINGS_MODULE: "usaspending_api.settings"
DATABASE_URL: postgres://${USASPENDING_DB_USER}:${USASPENDING_DB_PASSWORD}@${USASPENDING_DB_HOST}:${USASPENDING_DB_PORT}/data_store_api
Description:
Update the README and other aspects of the
usaspending-api
codebase to support local development.Technical details:
Below is a brief list of changes going file by file in order to give a high-level reasoning of "why".
.env.template
.gitignore
docker-compose.yaml
to use more relative pathsDockerfile
es_configure
job relies oncurl
to query the ES indexescurl
theelasticsearch_indexer
job fails to create the templates for the ES indexes and thus creates many mis-typed fields on the indexesDockerfile.spark
Dockerfile
to change the base image usedDockerfile.testing
Dockerfile.spark
/usaspending-api
instead of/dockermount
docker-compose
to instead usedocker compose
(read more here)README.md
docker-compose.yaml
version
as that is deprecated$PWD
in windows and also more WSL friendlyusaspending-test
volume to be/usaspending-api
in the container to support hot reload when testingusaspending_api/search/tests/integration/test_spending_by_category_categories.py
Requirements for PR merge:
Area for explaining above N/A when needed: