Skip to content

Conversation

@pkarman
Copy link

@pkarman pkarman commented Nov 14, 2025

Purpose

These changes add Docker Compose support to allow for local development consistent with the deployed environment. In theory, this would allow for deployment into alternate cloud platforms.

Changes

  • add documentation to the Makefile
  • add new make targets
  • add Dockerfile.api and docker-compose.yml

See also

MyFriendBen/benefits-api#1216

Copy link
Collaborator

@anth-volk anth-volk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @pkarman! One minor change suggested. Otherwise, this should be good to go, but would appreciate if you wouldn't also mind updating the documentation at config/README.md to describe how a user might set the specified environment variables within a Docker compose-driven workflow.

docker/start.sh Outdated
Comment on lines 10 to 18
# Start multiple workers using POSIX-compliant loop
# TODO worker.py does not seem to exist?
#i=1
#while [ $i -le "$WORKER_COUNT" ]
#do
# echo "Starting worker $i..."
# python3 policyengine_api/worker.py &
# i=$((i + 1))
#done
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: You should be able to remove this. This API doesn't use workers at all and never has, that's only our internal REST API.

@pkarman
Copy link
Author

pkarman commented Nov 25, 2025

Thanks for this @pkarman! One minor change suggested. Otherwise, this should be good to go, but would appreciate if you wouldn't also mind updating the documentation at config/README.md to describe how a user might set the specified environment variables within a Docker compose-driven workflow.

Sure thing. I added a note to config/README.md and another to README.md

The tl;dr is: config works much the same way, with the added convenience of creating a local .env file when using docker compose.

@anth-volk
Copy link
Collaborator

@pkarman apologies for the radio silence on this, I lost track of it over the holidays. I've added a couple minor changes and also opened a new PR at #1185, as the testing flow we use requires tokens that unfortunately can't be shared via forks. I'm going to close this PR, then get the new one over the line. Thanks for all of your contributions on this.

@anth-volk anth-volk closed this Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants