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

Traefik and duckdns setup #2610

Closed
2 tasks done
MarioProjects opened this issue Dec 22, 2020 · 5 comments
Closed
2 tasks done

Traefik and duckdns setup #2610

MarioProjects opened this issue Dec 22, 2020 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@MarioProjects
Copy link

MarioProjects commented Dec 22, 2020

My actions before raising this issue

Trying to setup Traefik with duckdns Gateway error

Expected Behaviour

Get working CVAT

Current Behaviour

Not working CVAT -> Bad Gateway

Possible Solution

A proper configuration

Steps to Reproduce (for bugs)

  1. git clone https://github.com/opencv/cvat
  2. cd cvat
  3. docker-compose build
  4. docker-compose.override.yml
version: '3.3'

services:
  cvat_proxy:
    environment:
      CVAT_HOST: cvat.example.duckdns.org
  1. docker-compose.yml (modified following)
# --- Removed networks section and put that ---
networks:
  web:
    external: true
  internal:
    external: false

# --- Under cvat-proxy: ---
ports:
      - '3750:80'
labels:
      - traefik.http.routers.cvat.rule=Host(`cvat.example.duckdns.org`)
      - traefik.http.routers.cvat.tls=true
      - traefik.http.routers.cvat.tls.certresolver=lets-encrypt
      - traefik.port=3750
networks:
      - internal
      - web

# -- Modified all services -> cvat_db, cvat_redis... networks to  (maybe this is wrong, removing aliases) --
networks:
      - internal
      - web
  1. docker-compose -f docker-compose.yml -f components/analytics/docker-compose.analytics.yml -f docker-compose.override.yml up -d --build

Context

Your Environment

  • Git hash commit (git log -1): commit 48b6da9
  • Docker version docker version (e.g. Docker 17.0.05): 20.10.1
  • Are you using Docker Swarm or Kubernetes? Docker
  • Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu 20.04
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

@bsekachev bsekachev added the question Further information is requested label Dec 28, 2020
@MarioProjects
Copy link
Author

I think that may be related with networks, if I could add internal and web to the default one you specified with the aliases 'ui' and so on

@MarioProjects
Copy link
Author

MarioProjects commented Jan 2, 2021

If I set my public address to CVAT_HOST I can access through the public IP

@MarioProjects
Copy link
Author

Solution: Traefik is not needed for that?! With next at docker-compose.override.yml file I am able to access cvat.myname.duckdns.org:3710.

version: '3.3'

services:
  cvat_proxy:
    environment:
      CVAT_HOST: cvat.myname.duckdns.org
    ports:
      - '3710:80'
    volumes:
      - ./letsencrypt-webroot:/var/tmp/letsencrypt-webroot
      - /root/.acme.sh:/root/.acme.sh

  cvat:
    environment:
      ALLOWED_HOSTS: '*'

Last question is, If I wont use 3710, only host name, if I set ports 80:80 it says ERROR: for cvat_proxy Cannot start service cvat_proxy: driver failed programming external connectivity on endpoint cvat_proxy (6bd422d9878e2861467ff18715bc99669e05aabaea7221ea6d9923b34744cd15): Bind for 0.0.0.0:80 failed: port is already allocated

@bsekachev
Copy link
Member

With Trafik questions, please refer to this PR #3409.
I will close the issue for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants