Conversation
chore: switch deployment to Docker Compose
fix: define deployment container name
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modernizes the application's configuration management by transitioning from static, file-based secrets to an environment-variable-driven approach. By removing the private configuration file and integrating standard environment variable patterns across the Spring profiles and Docker setup, the changes enhance security, simplify local development, and streamline containerized deployments. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the application configuration by removing the private profile and externalizing sensitive settings (JWT and AWS credentials) into environment variables across the dev, local, and prod profiles. It also introduces a docker-compose.yml file and updates the .gitignore and Dockerfile accordingly. The review feedback suggests making the .env file optional in docker-compose.yml to prevent build failures in environments where it is missing, and wrapping YAML property placeholders containing colons or commas in double quotes to avoid parsing issues.
| env_file: | ||
| - .env |
There was a problem hiding this comment.
Since .env is added to .gitignore and might not exist in all environments (such as CI/CD pipelines or production environments where environment variables are injected directly), referencing it as a required env_file will cause docker compose to fail with an error.
Consider making the .env file optional by using the path and required: false syntax (supported in Docker Compose v2.24.0+).
env_file:
- path: .env
required: false|
|
||
| cors: | ||
| allowed-origins: http://localhost:3000, https://dev.crew-wiki.site, https://dev.api.crew-wiki.site | ||
| allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:3000, https://dev.crew-wiki.site, https://dev.api.crew-wiki.site} |
There was a problem hiding this comment.
Unquoted property placeholders containing commas and colons (like URLs) can lead to parsing issues in YAML or unexpected behavior with Spring's property binder. It is safer and more robust to wrap the value in double quotes.
allowed-origins: "${CORS_ALLOWED_ORIGINS:http://localhost:3000, https://dev.crew-wiki.site, https://dev.api.crew-wiki.site}"|
|
||
| swagger: | ||
| server-url: https://dev.api.crew-wiki.site | ||
| server-url: ${SWAGGER_SERVER_URL:https://dev.api.crew-wiki.site} |
There was a problem hiding this comment.
|
|
||
| cors: | ||
| allowed-origins: https://crew-wiki.site, https://api.crew-wiki.site | ||
| allowed-origins: ${CORS_ALLOWED_ORIGINS:https://crew-wiki.site, https://api.crew-wiki.site} |
There was a problem hiding this comment.
Unquoted property placeholders containing commas and colons (like URLs) can lead to parsing issues in YAML or unexpected behavior with Spring's property binder. It is safer and more robust to wrap the value in double quotes.
allowed-origins: "${CORS_ALLOWED_ORIGINS:https://crew-wiki.site, https://api.crew-wiki.site}"|
|
||
| swagger: | ||
| server-url: https://api.crew-wiki.site | ||
| server-url: ${SWAGGER_SERVER_URL:https://api.crew-wiki.site} |
No description provided.