-
Notifications
You must be signed in to change notification settings - Fork 5
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
cannot access a replica running in another container #85
Comments
Could you describe what problem you want to solve? If you are using custom network address, you need to deploy mops on that network and publish packages, if you want to install them. |
A local replica, from limited testing, seems capable of running at an arbitrary internet address.. like a production ic server. Tying it to '127.0.0.1' seems unnecessarily limiting. In a docker-compose environment, the local replica may be running in a service with its own name i.e. 'test-replica'. In this environment, other services can access it via 'http://test-replica:4943'. A docker-compose environment is quite handy for testing in some CI/CD settings. A canister dockerfile can easily switch between 'test-replica' and 'ic' names for testing and production, respectively and it's fairly easy to add containers and external services. Hopefully that makes sense.. but I am adapting this approach from other projects so perhaps there is an easier way to do this. That would be Nice, too :). |
In mops, local '127.0.0.1' is must be used when you developing So, if you are just using |
Ok.. will look into it some more when I revisit this and let you know how it goes. My environment does not have many dependencies so it may well be atypical. If you wish to classify this as a feature request or close it, I would have no objection. Thanks for your help! |
@jb747 if you are sure you need it, I can add this feature, no problem) I just want to understand your use case. What canister id is should be when you specify a custom network? |
I'll get back to you.. it's not a blocker, currently. |
I would like to treat a container running a 'local' replica in a separate Docker container as a docker-compose service accessible via the service name within the Docker runtime environment.
I think this would require, at a minimum, changing getNetwork() to accept an internet address or DNS name by adding an 'else' to the logic:
I can submit a pull request, but currently have difficulty reproducing the build so I cannot test it in my environment. If this change makes sense, let me know if I can help.
The text was updated successfully, but these errors were encountered: