Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Sample config files? #1

Closed
emcniece opened this issue Feb 11, 2018 · 3 comments
Closed

Sample config files? #1

emcniece opened this issue Feb 11, 2018 · 3 comments
Labels
question Further information is requested

Comments

@emcniece
Copy link

Hey, nice work on the stack. All of these services volume out a config directory, any plans on sharing some example configs?

@stevewm
Copy link
Owner

stevewm commented Feb 11, 2018

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.

@stevewm stevewm added the question Further information is requested label Feb 11, 2018
@emcniece
Copy link
Author

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?

@stevewm
Copy link
Owner

stevewm commented Feb 11, 2018

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 = "name@domain.tld"
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.

@stevewm stevewm closed this as completed Feb 11, 2018
stevewm pushed a commit that referenced this issue Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants