Skip to content

chore: switch deployment to Docker Compose#164

Merged
CheChe903 merged 1 commit into
Crew-Wiki:developfrom
CheChe903:chore/compose-deployment
May 30, 2026
Merged

chore: switch deployment to Docker Compose#164
CheChe903 merged 1 commit into
Crew-Wiki:developfrom
CheChe903:chore/compose-deployment

Conversation

@CheChe903

Copy link
Copy Markdown
Member

No description provided.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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 streamlines the deployment process by introducing Docker Compose and centralizing configuration management. By moving sensitive and environment-specific settings into environment variables, the application becomes more flexible and easier to deploy across various stages without requiring hardcoded configuration files.

Highlights

  • Docker Compose Integration: Added a docker-compose.yml file to simplify service orchestration and environment configuration.
  • Configuration Refactoring: Migrated hardcoded security and cloud settings from application-private.yml into environment-specific profiles using environment variables.
  • Environment Variable Support: Updated application properties to use dynamic environment variables with sensible defaults, improving portability across different deployment environments.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/dev-cd.yml
    • .github/workflows/prod-cd.yml
  • Ignored by pattern: docs/** (1)
    • docs/architecture/deployment-and-runtime-config.md
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request restructures the application configuration by removing the private profile and parameterizing environment-specific configurations (dev, prod, local) using environment variables. It also introduces a docker-compose.yml file, updates the .gitignore to ignore environment files, and simplifies the Dockerfile entrypoint. Feedback on these changes includes: removing spaces after commas and wrapping values in double quotes for allowed-origins and server-url in YAML configurations to prevent parsing and CORS verification issues; making the .env file optional in docker-compose.yml to avoid startup failures when the file is absent; and providing default values for JWT_SECRET_EXPIRE_LENGTH in the dev and prod profiles to prevent Spring Boot startup failures when binding empty values to numeric types.

Comment on lines +19 to +22
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}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Having spaces after commas in the default value of allowed-origins (e.g., , https://...) can result in leading whitespaces in the parsed list of origins, which may cause CORS verification to fail. Additionally, wrapping values containing colons and commas in double quotes prevents potential YAML parsing issues.

Let's remove the spaces after the commas and wrap the values 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: "${SWAGGER_SERVER_URL:https://dev.api.crew-wiki.site}"

Comment on lines +19 to +22
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}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Having spaces after commas in the default value of allowed-origins (e.g., , https://...) can result in leading whitespaces in the parsed list of origins, which may cause CORS verification to fail. Additionally, wrapping values containing colons and commas in double quotes prevents potential YAML parsing issues.

Let's remove the spaces after the commas and wrap the values in double quotes.

  allowed-origins: "${CORS_ALLOWED_ORIGINS:https://crew-wiki.site,https://api.crew-wiki.site}"

swagger:
  server-url: "${SWAGGER_SERVER_URL:https://api.crew-wiki.site}"

Comment thread docker-compose.yml
Comment on lines +6 to +7
env_file:
- .env

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since .env is ignored in .gitignore, running docker compose up will fail if the .env file is not present. In modern Docker Compose (v2.24.0+), you can make the environment file optional by using the path and required: false syntax. This prevents startup failures when environment variables are supplied directly via the shell or CI/CD environment.

    env_file:
      - path: .env
        required: false

jwt:
token:
secret-key: ${JWT_SECRET_KEY}
expire-length: ${JWT_SECRET_EXPIRE_LENGTH}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

If the JWT_SECRET_EXPIRE_LENGTH environment variable is not set, Spring Boot will fail to start because it cannot bind an empty/missing value to a long type. Providing a sensible default value (e.g., 3600000 for 1 hour) prevents startup failures.

      expire-length: ${JWT_SECRET_EXPIRE_LENGTH:3600000}

jwt:
token:
secret-key: ${JWT_SECRET_KEY}
expire-length: ${JWT_SECRET_EXPIRE_LENGTH}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

If the JWT_SECRET_EXPIRE_LENGTH environment variable is not set, Spring Boot will fail to start because it cannot bind an empty/missing value to a long type. Providing a sensible default value (e.g., 3600000 for 1 hour) prevents startup failures.

      expire-length: ${JWT_SECRET_EXPIRE_LENGTH:3600000}

@CheChe903 CheChe903 merged commit 6988fb7 into Crew-Wiki:develop May 30, 2026
1 check passed
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.

1 participant