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

Question: traefik setup to make multiple containers accessible in local network. #2614

Closed
bsr203 opened this issue Jul 25, 2022 · 2 comments
Closed
Assignees

Comments

@bsr203
Copy link

bsr203 commented Jul 25, 2022

Hello,

TLDR: Request for instructions to setup a simple traefik proxy to access all nav containers on localhost.

I was previously exposing container ports during New-BcContainer to make multiple containers in local network.

	-WebClientPort 8082 `
	-FileSharePort 8280 `
	-ManagementServicesPort 7245 `
	-ClientServicesPort 7246 `
	-SoapServicesPort 7247 `
	-ODataServicesPort 7248 `
	-DeveloperServicesPort 7249 `
    	-updateHosts `
    	-publishPorts @(8082,8280,7245,7246,7247,7248,7249)

.@freddydk suggested the use of traefik, and as I started using more containers, it became hard to remember all the ports and managing them without conflict.

I am not an expert on docker and windows, and also never used traefik. My requirements are simple

  • create multiple containers using New-BcContainer with containerName say bc1, bc2, bc3,..
  • make them available in local network and able to develop against (so all ports needs to be exposed and able to debug,..)

When try to follow the official installation instruction, I got this error.

PS C:\Users\bsr\work\docker\traefik> docker-compose up -d reverse-proxy
Creating network "traefik_default" with the default driver
Pulling reverse-proxy (traefik:v2.8)...
v2.8: Pulling from library/traefik
ERROR: no matching manifest for windows/amd64 10.0.22000 in the manifest list entries

While trying to troubleshoot, I saw few items in this repository, which make me doubt my approach.

It will be great if we can document (or point to a blog post) how to setup traefik, so we can add a container quickly and access it in localhost for development.

Thanks
bsr.

@bsr203 bsr203 changed the title Question: traefik setup to make multiple containers in local network. Question: traefik setup to make multiple containers accessible in local network. Jul 25, 2022
@freddydk
Copy link
Contributor

freddydk commented Jul 26, 2022

You can use the command in BcContainerHelper called:

Setup-TraefikContainerForBcContainers

It exposed URLs instead of ports for the various endpoints.
Tobias Fenster wrote a blockpost back in the days on the details

@bsr203
Copy link
Author

bsr203 commented Jul 27, 2022

For the record, this is the blog post @freddydk mentioned
https://www.axians-infoma.de/techblog/traefik-support-for-navcontainerhelper-the-nav-arm-templates-for-azure-vms-and-local-environments/

There is also a great video presentation about this topic by the same author
https://www.youtube.com/watch?v=Dr6bFoRELnY

@bsr203 bsr203 closed this as completed Jul 27, 2022
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

No branches or pull requests

2 participants