-
Notifications
You must be signed in to change notification settings - Fork 16
Global network #169
Global network #169
Conversation
f7ff1c8 to
7069b29
Compare
7069b29 to
704f48c
Compare
|
@roschaefer I think it's a great idea to use shared networks between API and WebApp and it worked on my machine (Linux) like you described the procedure.
Still I have some points on this to consider:
After some testing I found a way to remove the DNS proxy without sacrificing usability and this is by using xip.io for DNS resolution.
Caveats:
Other than that, it works on Mac OS and it should also work on Windows as well (@mimicc83 would you please confirm that?). Note that I removed the network details in the following examples as they are the defaults anyway. WebAPI docker-compose.yml: API docker-compose.yml: |
ionphractal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comment in the conversation (#169 (comment))
docker-compose.staging.yml
Outdated
| hc-network: | ||
| name: hc-network | ||
| driver: bridge | ||
| ipam: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this and below (ipam), it's the default
docker-compose.yml
Outdated
| services: | ||
| api: | ||
| container_name: api | ||
| hostname: api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove when you remove the DNS proxy
docker-compose.yml
Outdated
| - hc-network | ||
| command: "--smallfiles --logpath=/dev/null" | ||
|
|
||
| dns-proxy-server: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the DNS Proxy and use xip.io
docker-compose.yml
Outdated
|
|
||
| services: | ||
| api: | ||
| container_name: api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to api.127.0.0.1.xip.io
docker-compose.yml
Outdated
| networks: | ||
| hc-network: | ||
| name: hc-network | ||
| driver: bridge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove lines below, they are the default
|
@ionphractal thanks a lot! I did what you suggested and mentioned you in the commits |
3.5webappservice can join with anotherdocker-compose up