hello,
i want use port 6001 on same subdomain as http like me.domain.com:6001, only works on port 80 and using entry points to mapping ports but same problem, this is my config
trafke docker-compose
version: '3.7'
services:
traefik:
image: traefik:v2.7
container_name: traefik
command:
- --api.insecure=true
- --api.dashboard=true
- --api.debug=true
- --log.level=DEBUG
- --providers.docker=true
- --providers.docker.exposedbydefault=false
restart: always
security_opt:
- no-new-privileges:true
ports:
- "80:80"
- "8080:8080"
- "6001:6001"
- "6002:6002"
- "9601:9601"
- "9602:9602"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/traefik.yml:/traefik.yml
- ./data/acme.json:/acme.json
# Add folder with dynamic configuration yml
- ./data/configurations:/configurations
networks:
- external_network
labels:
- "traefik.enable=true"
- "traefik.docker.network=external_network"
- "traefik.http.routers.traefik-secure.entrypoints=web,websecure"
- "traefik.http.routers.traefik-secure.rule=Host(`dash.domain.com`)"
- "traefik.http.routers.traefik-secure.middlewares=user-auth@file"
- "traefik.http.routers.traefik-secure.service=api@internal"
networks:
external_network:
external: true
trafiek.yml
api:
dashboard: true
entryPoints:
web:
address: :80
ws:
address: :6001
ws-api:
address: :9601
ws-api2:
address: :9602
ws2:
address: :6002
db:
address: :5050
websecure:
address: :443
accessLog:
filePath: "/configurations/access.log"
pilot:
dashboard: false
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /configurations/dynamic.yml
certificatesResolvers:
letsencrypt:
acme:
email: admin@domain.com
storage: acme.json
keyType: EC384
httpChallenge:
entryPoint: web
buypass:
acme:
email: admin@domain.com
storage: acme.json
caServer: https://api.buypass.com/acme/directory
keyType: EC256
httpChallenge:
entryPoint: web
applications nginx and websocket socketi compose file
version: '3'
networks:
external_network:
external: true
net_daf:
driver: bridge
services:
app:
image: nginx:stable-alpine
container_name: nginx_http
# ports:
# - "8083:80"
# - "8082:80"
volumes:
- ./app/app1:/var/www/html/app1
- ./app/app2:/var/www/html/app2
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- postgres
- redis
labels:
- "traefik.enable=true"
- "traefik.http.routers.nginx_http.rule=Host(`me.domain.com`,`test.domain.com`)"
- "traefik.http.services.app.loadbalancer.server.port=80"
- "traefik.http.routers.nginx_http.service=app"
- "traefik.http.routers.nginx_http.entrypoints=web"
- "traefik.docker.network=external_network"
networks:
- external_network
- net_daf
soketi:
container_name: soketi_container
image: quay.io/soketi/soketi:1.0.1-16-debian
#network_mode: "host"
# ports:
# - "6001:6001"
# # - "6002:6002"
# # - "9601:9601"
volumes:
- ./app/app1/soketi/config.json:/config.json
command: "--config=/config.json"
networks:
- net_daf
- external_network
labels:
- "traefik.enable=true"
- "traefik.http.routers.soketi.rule=Host(`me.domain.com`)"
- "traefik.http.services.soketi.loadbalancer.server.port=6001"
- "traefik.http.routers.soketi.entrypoints=ws,ws-api"
- "traefik.http.routers.soketi.service=soketi"
- "traefik.docker.network=external_network"
and this pic from traefik dashboard all ports exposed, only port 80 works from http request on domains
thanks