Comments (6)
Hi there. I added this in version 5.0.0 and 6.0.0 (pyre python rebuild) and am getting reports it's not working.
Will be adding a new development release shortly with some debugging code so I can get some logs to look at.
Will be a day or so.
from docker-traefik-cloudflare-companion.
brilliant will this be under the "latest" tag or another one for the dockerhub image
from docker-traefik-cloudflare-companion.
You can try tag 6.0.2
for your secrets of CF_EMAIL and CF_TOKEN - Let me know.
from docker-traefik-cloudflare-companion.
You can try tag
6.0.2
for your secrets of CF_EMAIL and CF_TOKEN - Let me know.
I will give it a try but there isn't a 6.0.2 only 6.0.1 ?
from docker-traefik-cloudflare-companion.
Using the email and global api token appears to be working for me. Since I'm using Traefik with secrets, I wound up creating a second secret for both email and API that point to the same folder since the ENV variable names were different. This appears to be working for me. If there is a better way to somehow alias different secrets to the same file without redundant global declarations I'd be interested in that.
Using any name for the secrets with the container here except for cf_email and cf_token did not work, as expected.
cloudflare_email:
file: $SECRETSDIR/cloudflare_email
cf_email:
file: $SECRETSDIR/cloudflare_email
cloudflare_api_key:
file: $SECRETSDIR/cloudflare_api_key
cf_token:
file: $SECRETSDIR/cloudflare_api_key
########################### SERVICES - FRONT ENDS
# Traefik 2 - Reverse Proxy & LetsEncrypt Certs
traefik:
image: traefik:picodon
container_name: traefik
restart: always
networks:
- $TRAEFIK_NETWORK
- $SOCKET_NETWORK
security_opt:
- no-new-privileges
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
volumes:
- $DOCKERDIR/traefik/rules:/rules
- $DOCKERDIR/traefik/acme/acme.json:/acme.json
- $DOCKERDIR/traefik/traefik.log:/traefik.log
- $DOCKERDIR/traefik/traefik.yml:/traefik.yml:ro
environment:
- CF_API_EMAIL_FILE=/run/secrets/cloudflare_email
- CF_API_KEY_FILE=/run/secrets/cloudflare_api_key
secrets:
- cloudflare_email
- cloudflare_api_key
labels:
- "traefik.enable=true"
## HTTP Routers
- "traefik.http.routers.traefik-rtr.entrypoints=https"
- "traefik.http.routers.traefik-rtr.rule=Host(`traefik.$DOMAINNAME`)"
## Middlewares
- "traefik.http.routers.traefik-rtr.middlewares=chain-authelia@file"
## HTTP Services
- "traefik.http.routers.traefik-rtr.service=api@internal"
# Cloudflare-Companion - Automatic container CNAME DNS Creation
cloudflare-companion:
image: tiredofit/traefik-cloudflare-companion
container_name: cloudflare-companion
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- $SOCKET_NETWORK
depends_on:
- socket-proxy
environment:
- TIMEZONE=$TZ
- TRAEFIK_VERSION=2
- CF_EMAIL_FILE=/run/secrets/cf_email
- CF_TOKEN_FILE=/run/secrets/cf_token
- CONTAINER_LOG_LEVEL=info
- TARGET_DOMAIN=$DOMAINNAME
- DOMAIN1=$DOMAINNAME
- DOMAIN1_ZONE_ID=$CF_API_ZONE_ID
- DOMAIN1_PROXIED=TRUE
- DOCKER_HOST=tcp://socket-proxy:2375
secrets:
- cf_email
- cf_token
from docker-traefik-cloudflare-companion.
If there is a better way to somehow alias different secrets to the same file without redundant global declarations I'd be interested in that.
There is no better way than that. The issue is that the python function used is not processing secrets the "traditional way".
email = get_docker_secret('CF_EMAIL', autocast_name=True, getenv=True)
It basically goes directly to the /run/secrets directory to find a file named "cf_email", and if not found, fallback on an env variable named "CF_EMAIL". It ignores your CF_EMAIL_FILE and CF_TOKEN_FILE env vars.
To avoid duplication, you would have to set CF_API_EMAIL_FILE=/run/secrets/cf_email
for traefik.
from docker-traefik-cloudflare-companion.
Related Issues (20)
- Logging HOT 3
- script 10-cloudflare-companion did not pass completion check HOT 2
- DOMAIN2 ... DOMAIN3 ... generating errors
- Base container not handle very well drop all caps and run as non-root
- Rate limited. Please wait and consider throttling your request speed
- Image fails to pull on any LXC instance of Docker HOT 2
- Constant Authentication Errors HOT 3
- Disable zabbix-agent per default HOT 1
- REFRESH_ENTRIES is false but companion tries to post existing CNAME
- 9207 Content-type must be application/json
- Issue (and fix) for SWARM_MODE not working with a daemon proxy
- Version 6.9.0 HOT 5
- Automatically detect domains HOT 1
- No Connection Adapters were found HOT 1
- Traefik Poll not picking up hosts from file HOT 1
- Labels are ignored HOT 6
- Could not route to /client/v4/zones/dns_records HOT 1
- `fmt` is not defined. HOT 1
- Container specific proxied status
- update readme for inconsistent TRAEFIK_FILTER vs TRAEFIK_CONSTRAINT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-traefik-cloudflare-companion.