Configuration file consistency

Ensure configuration values are consistent and properly coordinated across all related files (docker-compose, .env files, initialization scripts, workflows, etc.). Verify that port mappings, environment variables, and tokens don't conflict between files, and provide fallback configurations for critical settings.

copy reviewer prompt

Prompt

Reviewer Prompt

Ensure configuration values are consistent and properly coordinated across all related files (docker-compose, .env files, initialization scripts, workflows, etc.). Verify that port mappings, environment variables, and tokens don’t conflict between files, and provide fallback configurations for critical settings.

Key practices:

  • Cross-reference port assignments between docker-compose and .env files to prevent conflicts
  • When adding new environment variables, update all relevant files (.env.example, init scripts, docker-compose)
  • Provide fallback tokens/credentials (e.g., use GITHUB_TOKEN as fallback when PAT is not available)
  • Test configuration changes locally to catch startup issues early

Example from discussions:

# Bad: Port conflict
ports:
  - '8000:8000'  # Conflicts with CASDOOR_PORT=8000 in .env

# Good: Use environment variable consistently
ports:
  - '${CASDOOR_PORT}:${CASDOOR_PORT}'
# Bad: No fallback
target_repo_token: ${{ secrets.PAT_FOR_SYNC }}

# Good: Provide fallback
target_repo_token: ${{ secrets.PAT_FOR_SYNC || secrets.GITHUB_TOKEN }}

Source discussions