Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

using multiple apps #1

Open
phmalek opened this issue Jan 31, 2024 · 0 comments
Open

using multiple apps #1

phmalek opened this issue Jan 31, 2024 · 0 comments

Comments

@phmalek
Copy link

phmalek commented Jan 31, 2024

When I use the docker-compose.yml file for the case where I have 2 apps, namely app1 and app2, strangely, it only opens app1. (I have addedd "url_base_pathname=/appx/" for both app1 and app2 and I have exposed them to 8050 and 8000 respectiveley). Could you share a docker-compose file functional for this case?

Here is my docker-compose.yml

`
version: "3.3"

services:
proxy:
image: traefik:v2.3
command:
--api=true
--api.insecure=true
--api.dashboard=true
--entryPoints.web.address=:80
--providers.docker
--providers.docker.watch=true
--providers.docker.swarmMode=true
--log.level=DEBUG
--ping.entrypoint=web
--passHostHeaders=false
ports:
- 1080:80
- 8080:8080
networks:
- dash-net
# depends_on:
# - dash
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
replicas: 1
restart_policy:
condition: any
labels:
- traefik.enable=false
placement:
constraints:
- node.role == manager

dash:
image: app1
# build: .
networks:
- dash-net
deploy:
replicas: 1
restart_policy:
condition: any
labels:
- traefik.enable=true
- traefik.docker.network=dash-net
- traefik.http.routers.dash.rule=Host(localhost)
- traefik.http.services.dash.loadbalancer.server.port=8050

dash2:
image: app2
# build: .
networks:
- dash-net
deploy:
replicas: 1
restart_policy:
condition: any
labels:
- traefik.enable=true
- traefik.docker.network=dash-net
- traefik.http.routers.dash2.rule=Host(localhost)
- traefik.http.services.dash2.loadbalancer.server.port=8000

networks:
dash-net:
external: true
`

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant