Add docker-compose file with better local debugging support #1
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.
This adds a docker-compose.yml file and updates the README to simplify running the app to just
docker-compose up -d
. This should greatly simplify the experience for new users running the emulator. The compose file also uses named volumes for easy persistence and access from the host for the keypair and database files.In order to better support local debugging without having to have access to system folders, this uses an environment variable when running in Docker for the database and cert/key files, but defaults to a "data" folder within the repo so that the IDE/CLI does not need special permissions to /var (on macOS/Linux).
Additionally, the openssl command has been moved into
keygen.sh
which can be run locally for local development, but is also run by the container and is aware of those Docker Compose environment variables, falling back to the local data folder.