Giter Club home page Giter Club logo

Comments (3)

stevewm avatar stevewm commented on May 22, 2024 1

For example, if traefik/acme.json does not exist on the host, Docker creates traefik/acme.json/ (a directory) instead of a file. The easy solution is to ensure that these files exist on the host before starting this container.

Indeed, this is expected behaviour from Docker (although whether it's desirable is another thing). The README does contain steps that, if followed, should ensure users don't end up encountering that issue.

Would you be willing to share a cleaned copy of traefik.toml from your setup?

My setup, sans email, is below. It should be identical to the provided example in the repo. It's odd you're encountering issues, could you attach the Traefik log?

debug = false

logLevel = "ERROR"
defaultEntryPoints = ["https","http"]

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]

[entryPoints.https.auth.basic]
  usersFile = "/etc/traefik/.htpasswd"


[retry]

[acme]
email = "[email protected]"
storage = "acme.json"
entryPoint = "https"
OnHostRule = true
[acme.httpChallenge]
entryPoint = "http"

Are you attached to Traefik?

In the sense of wanting to continue to use it? I am.
In the sense of being involved with the project in a role other than consumer? I am not.

I'm a co-author of https://github.com/CausticLab/rgon-proxy which we wrote to be a simpler Nginx reverse proxy option - would you be interested in seeing a PR to swap Traefik for Rgon?

Right now Traefik fulfills my requirements well, but should that change in the future I'll definitely keep Rgon in mind.

from docker-compose-usenet.

stevewm avatar stevewm commented on May 22, 2024

Thanks, appreciate the feedback.

No plans to supply example configs for services at the moment, in part because I don't want to dictate configuration to users beyond the structure of the stack.

Additionally, having a set of example configs would likely result in users being lazy and not changing the API keys to unique ones. Ideally we'd be able to supply a file location for API keys on per-service basis, allowing the use of Docker secrets - but I don't have much desire to submit a PR to each project to enable that.

from docker-compose-usenet.

emcniece avatar emcniece commented on May 22, 2024

Makes sense, thank you. Secrets would indeed be nice. These stacks populate the config directory with config files if the files don't exist, so that makes it easy to modify.

I ask primarily with Traefik in mind as I am having a hard time getting the [acme] config to work properly. It either fatals out with an unknown entrypoint message, or it redirects endlessly and eats up 16GB RAM in 30 seconds.

There is a catch (and possibly something that warrants a README update) - if individual files are volumed in, and the files don't already exist on the host, Docker will create directories with these names instead of files. This causes Traefik to have a hissy fit.

  traefik:
    image: traefik:latest
    ...
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ${CONFIG}/traefik/acme.json:/acme.json
      - ${CONFIG}/traefik/traefik.toml:/etc/traefik/traefik.toml
      - ${CONFIG}/traefik/.htpasswd:/etc/traefik/.htpasswd:ro

For example, if traefik/acme.json does not exist on the host, Docker creates traefik/acme.json/ (a directory) instead of a file. The easy solution is to ensure that these files exist on the host before starting this container.

This brings me to my current problem of trying to configure Traefik - I have created traefik.toml and am trying to populate it using various web examples, but I either get a fatal or an endless redirect loop and massive memory leak.

More questions:

  1. Would you be willing to share a cleaned copy of traefik.toml from your setup?
  2. Are you attached to Traefik?
  3. I'm a co-author of https://github.com/CausticLab/rgon-proxy which we wrote to be a simpler Nginx reverse proxy option - would you be interested in seeing a PR to swap Traefik for Rgon?

from docker-compose-usenet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.