autonomys / astral

Home of our Block Explorer
https://explorer.subspace.network
11 stars 9 forks source link

fix ports for indexer services #940

Closed DaMandal0rian closed 2 days ago

DaMandal0rian commented 2 days ago

PR Type

configuration changes


Description


Changes walkthrough ๐Ÿ“

Relevant files
Configuration changes
docker-compose.yml
Update port configuration for indexer services                     

docker-compose.yml
  • Changed expose to ports for indexer services.
  • Mapped external ports 3001, 3002, and 3003 to internal port 3000.
  • +6/-6     

    ๐Ÿ’ก PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    netlify[bot] commented 2 days ago

    Deploy Preview for dev-astral canceled.

    Name Link
    Latest commit cc646d85d26747ab4c7d35e8e65ec0ea9bd76a17
    Latest deploy log https://app.netlify.com/sites/dev-astral/deploys/67337a003837a90008bee7bc
    github-actions[bot] commented 2 days ago

    PR Reviewer Guide ๐Ÿ”

    Here are some key observations to aid the review process:

    โฑ๏ธ Estimated effort to review: 1 ๐Ÿ”ตโšชโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก No major issues detected
    github-actions[bot] commented 2 days ago

    PR Code Suggestions โœจ

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Specify the network protocol for port mappings to ensure correct communication ___ **Consider specifying the protocol (TCP/UDP) for the ports configuration to ensure the
    correct protocol is used for communication.** [docker-compose.yml [193-194]](https://github.com/autonomys/astral/pull/940/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3R193-R194) ```diff ports: - - "3001:3000" + - "3001:3000/tcp" ```
    Suggestion importance[1-10]: 6 Why: Specifying the protocol can prevent potential issues with default protocol assumptions, enhancing network configuration clarity and correctness.
    6
    Maintainability
    Validate the 'depends_on' conditions to avoid service startup delays or failures ___ **Ensure that the 'depends_on' configurations with 'service_healthy' conditions are
    adequately tested to prevent startup issues if the health checks are not properly
    defined or the services take longer to become healthy.** [docker-compose.yml [196-197]](https://github.com/autonomys/astral/pull/940/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3R196-R197) ```diff +depends_on: + "postgres": + condition: service_healthy - ```
    Suggestion importance[1-10]: 5 Why: Ensuring the 'depends_on' conditions are correctly implemented is important for service reliability, but the suggestion lacks specific actionable changes.
    5
    Possible issue
    Ensure that the port mappings are correctly configured for each service ___ **Verify if the internal port '3000' is intended to be exposed on different external
    ports ('3001', '3002', '3003') to avoid misconfiguration and ensure that each
    service is accessible as intended.** [docker-compose.yml [193-194]](https://github.com/autonomys/astral/pull/940/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3R193-R194) ```diff +ports: + - "3001:3000" + - "3002:3000" + - "3003:3000" - ```
    Suggestion importance[1-10]: 4 Why: The suggestion is valid for verifying port configurations, but it does not provide a concrete improvement or change, hence a moderate score.
    4
    Check for potential internal port conflicts among services ___ **Review the necessity of exposing the same internal port '3000' for different
    services, as this might indicate a need for different internal configurations or
    potential conflicts.** [docker-compose.yml [193-194]](https://github.com/autonomys/astral/pull/940/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3R193-R194) ```diff +ports: + - "3001:3000" + - "3002:3000" + - "3003:3000" - ```
    Suggestion importance[1-10]: 4 Why: The suggestion raises a valid concern about port conflicts, but it does not provide specific solutions or identify actual conflicts, thus receiving a moderate score.
    4