Comments (4)
from caddy-docker-proxy.
You're completely right.
This is a regression, the suffix shouldn't be ignored.
I will create a PR addressing those issues.
from caddy-docker-proxy.
Thanks for the hint @lucaslorentz. Unfortunately it doesn't work as expected. This is my Compose file:
version: '3.2'
services:
frontend:
image: mycaddy
labels:
caddy_1: (myDefaults)
caddy_1.log: / stdout
caddy_2: (myTlsDefaults)
caddy_2.import: myDefaults
caddy_2.tls: self_signed
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
backend:
image: mycaddy
labels:
caddy_1: http://example.lan
caddy_1.import: myDefaults
caddy_1.redir: https://example.lan{uri}
caddy_2.address: https://example.lan
caddy_2.import: myTlsDefaults
caddy_2.targetport: 2015
caddy_2.proxy.keepalive: 0
and this is the log from the test_frontend
service:
test_frontend.1.7w9l2vi0vioz@swarm01 | 2018/09/13 09:43:02 [ERROR] CaddyFile error: :2 - Error during parsing: File to import not found: myDefaults
test_frontend.1.7w9l2vi0vioz@swarm01 | 2018/09/13 09:43:02 [INFO] Wrong CaddyFile:
test_frontend.1.7w9l2vi0vioz@swarm01 | (myTlsDefaults) {
test_frontend.1.7w9l2vi0vioz@swarm01 | import myDefaults
test_frontend.1.7w9l2vi0vioz@swarm01 | redir https://example.lan{uri}
test_frontend.1.7w9l2vi0vioz@swarm01 | tls self_signed
test_frontend.1.7w9l2vi0vioz@swarm01 | }
test_frontend.1.7w9l2vi0vioz@swarm01 | https://example.lan {
test_frontend.1.7w9l2vi0vioz@swarm01 | import myTlsDefaults
test_frontend.1.7w9l2vi0vioz@swarm01 | proxy / 10.0.0.4:2015 {
test_frontend.1.7w9l2vi0vioz@swarm01 | keepalive 0
test_frontend.1.7w9l2vi0vioz@swarm01 | }
test_frontend.1.7w9l2vi0vioz@swarm01 | }
It seems to ignore the _#
suffix and only takes the last directive.
from caddy-docker-proxy.
This will be a breaking change on next version:
#70
Use caddy
label instead of caddy.address
to avoid generating proxy directive.
from caddy-docker-proxy.
Related Issues (20)
- Run server NOT in docker? (but controller in docker) HOT 1
- Add --pidfile flag to docker-proxy
- wildcard not working HOT 2
- IPv6 Logging not working HOT 2
- Caddy 2.8 Final Release HOT 2
- Trouble with generic logging snippet import HOT 2
- Expose caddy admin 2019
- Custom images HOT 2
- How to local test caddy with whoami HOT 1
- Changing HTTP status code rewrite - is that possible using labels? HOT 1
- Simple redirect to custom 404.html (static site)
- Global options seems not working in caddy-docker-proxy itself HOT 1
- basic_auth label is still being written to caddyfile as basicauth which spams logs HOT 2
- Using the upstreams template in a snippet with arguments
- caddy-docker-proxy as file server ? HOT 1
- Is it possible to inject directives in an existing service? HOT 4
- Using CDP as a reverse proxy for non-docker services - is it possible? HOT 2
- How to enable caddy-docker-proxy in a new build? HOT 2
- Help to convert a snippet to labels HOT 10
- Searxng-docker Caddyfile Conversion Help HOT 1
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 caddy-docker-proxy.