-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add CORE_STUB_KEYSTORE_FILE property #60
base: main
Are you sure you want to change the base?
Conversation
c13c2ad
to
59f2e06
Compare
@@ -21,7 +21,6 @@ COPY --from=build \ | |||
/app/ | |||
|
|||
WORKDIR /app | |||
ADD config config |
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 are you removing the adding of the config directory?
Edit: I reread the PR. Its so it can be public facing?
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'm not that fussed about whether the image is public or private - I just need it somewhere that it can be easily accessed. The config on the other hand is definitely private, and I don't want an entire config repo exposed for a few settings.
So the approach is build the image so it works without config. Locally it can be run with a sibling path to the config. In a PR we get the necessary config from a S3 bucket, which reduces the blast radius if something went wrong.
59f2e06
to
c6aedc4
Compare
@@ -0,0 +1,17 @@ | |||
version: "3.9" |
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.
The script & .env file have been swapped for a docker-compose file with environment variables and volumes. The secret stuff is still elsewhere
@@ -17,29 +17,30 @@ This stub allows us to: | |||
## Config | |||
|
|||
Core Stub config from the `di-ipv-config` repository directory `/stubs/di-ipv-core-stub` will be available at: | |||
* Docker image: `/app/config/` | |||
* Docker image: `/app/` |
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.
Rather than create an empty config directory, it seemed easier to mount the required files into the existing app directory.
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.
Looks good to me
My understanding
- We're providing the config variables as a file now, file loc to be set in the .env.
My only suggestion would be provide an example env file, if needed.
Yeah, there's an additional property now for the "keystore as a keystore file" to match the "keystore as a base64 string".
Local usage of the stub doesn't change. The config directory is referenced by the Dockerfile, and that's mentioned in the |
c6aedc4
to
2ef7284
Compare
keystore.load( | ||
inputStream, CoreStubConfig.CORE_STUB_KEYSTORE_PASSWORD.toCharArray()); | ||
} | ||
} else if (CoreStubConfig.CORE_STUB_KEYSTORE_BASE64 != null) { |
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.
Heads up but looking at the current deployment in PaaS, this has already been set. So you might need to update it
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.
lgtm - just to note a the base64 keystore env has been added in paas already, you might need to update it or something
- Add CORE_STUB_KEYSTORE_FILE property - Add property for keystore_file - Add conditional logic to handle missing both of keystore_file and keystore_base64 properties - Add compose file for docker-compose startup - Delete bash script for startup
2ef7284
to
bb91fb4
Compare
Proposed changes
What changed
Why did it change
This Docker image needs to be built without config in it to be a publicly available image
Issue tracking
Checklists
Environment variables or secrets
Other considerations