Skip to content
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

Fix DNS error on WASM adding static IPs to every container on a new network #22

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

aalonsolopez
Copy link
Contributor

This change solves an error with Docker's DNS. With this, instead of relying on the DNS, we assign static IPs to every container on a new network called "Fixed" and we specify the exact DB direction on the DATABASE_URL env variable.

Copy link
Member

juntao commented Feb 15, 2024

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Commit 9c26528614311e5356ce36172d19692942185510

Key changes:

  • Added networks section to specify a custom network.
  • Added ipv4_address to each service to assign static IP addresses within the network.
  • Added networks section to the db service to assign it an IP address.
  • Added networks section to the server service to assign it an IP address.
  • Added networks section to the client service to assign it an IP address.

Potential problems:

  • The patch specifies a custom network called fixed, but it does not provide any explanation or rationale for using a custom network instead of the default bridge network. It is important to ensure that using a custom network is necessary for the desired functionality.
  • The patch assigns static IP addresses to each service. This can lead to conflicts if the specified IP addresses are already in use by other containers or devices in the network. Care should be taken to ensure that the specified IP addresses are not overlapping with any existing IPs.
  • The DNS server is set to 127.0.0.11:53, which might be specific to the local development environment. It is important to verify that this DNS server configuration is appropriate for the target deployment environment.
  • The patch modifies the DATABASE_URL environment variable of the server service to use an IP address (172.20.0.5) instead of the hostname (db). This may cause issues if the IP address of the database server changes or if the database server is deployed on a different machine. It is recommended to use hostnames or service names instead of hardcoding IP addresses for better flexibility and scalability.
  • The patch modifies the docker-compose.yml file directly, which can cause conflicts if there are other changes made to the file by another developer. It is recommended to use feature branches or forks to isolate changes and minimize conflicts.
  • There are no tests or validation checks included in the patch to ensure the correctness and integrity of the changes. It is recommended to include tests and perform thorough testing before merging the changes.

Copy link
Member

@hydai hydai left a comment

Choose a reason for hiding this comment

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

Workaround for the internal DNS issue. Still need to figure out why the DNS is not working.

@hydai hydai merged commit 31bae7f into second-state:main Feb 15, 2024
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.

3 participants