-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Replace script #3281
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
Replace script #3281
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ services: | |
dockerfile: ./docker/api.Containerfile | ||
# https://docs.docker.com/reference/compose-file/build/#target | ||
target: production | ||
|
||
entrypoint: ["/bin/sh", "-c", "replaceJwt.sh"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Review the new entrypoint directive. The addition of the entrypoint directive: entrypoint: ["/bin/sh", "-c", "replaceJwt.sh"] ensures that the
If you need assistance in enhancing or verifying the script’s behavior, please let me know. |
||
# https://docs.docker.com/reference/compose-file/services/#depends_on | ||
depends_on: | ||
minio: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# Define the path to the compose file | ||
COMPOSE_FILE="./.env" | ||
|
||
# Generate a random JWT-like token (modify this logic if needed) | ||
RANDOM_TOKEN=$(openssl rand -base64 32 | tr -d '=+/') | ||
VanshikaSabharwal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Replace placeholder with the generated token | ||
sed -i "s/REPLACE_WITH_RANDOM_JWT_TOKEN/$RANDOM_TOKEN/g" "$COMPOSE_FILE" | ||
VanshikaSabharwal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
echo "Token replaced successfully!" |
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.
🧹 Nitpick (assertive)
Remove trailing spaces.
Static analysis reported trailing spaces on this line. Please remove any extraneous whitespace to adhere to YAML formatting standards.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 22-22: trailing spaces
(trailing-spaces)