pascalandy / docker-stack-this Goto Github PK
View Code? Open in Web Editor NEWA Docker Stack that just work. With Traefik, Socat, Portainer, Nginx, Caddy, Whoami
License: Other
A Docker Stack that just work. With Traefik, Socat, Portainer, Nginx, Caddy, Whoami
License: Other
(email by Matteo)
Message:
Hi Pascal, I've some question about your docker-stack-this. I've Docker Swarm with 3 nodes and until the previous week, I used Docker Flow Proxy + Letsencrypt companion for manage different container. Sunday I decided to try Treafik because the Flow solution uses too much container. Using this command
docker service create
--name traefik
--constraint=node.role==manager
--publish 80:80 --publish 443:443 --publish 8080:8080
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock,readonly
--mount type=bind,source=/var/tmp,target=/etc/traefik/acme
--network traefik-net
traefik
--entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
--entryPoints='Name:https Address::443 TLS'
--defaultEntryPoints=http,https
--acme.entryPoint=https
--acme.email=[email protected]
--acme.storage=/etc/traefik/acme/acme.json
--acme.domains=myawesomesite.com
--acme.onHostRule=true
--docker
--docker.swarmmode
--docker.domain=myawesomesite.com
--docker.watch
--web
I can run traefik successfully. But in this case, I can't protect dashboard. So I decided to use a custom toml file, but I can't mount (with eval docker host mode) it correctly. I use this: https://gist.github.com/tehKapa/cd78c15e3b3655e7a78765595f446a9e
The only error that I have is "invalid mount config for type bind". Have you any suggestion?
Thanks!
I used this to store the pictures outside the repo.
Is it possible to do the same thing you did with the Portainer redirection using Pgadmin4? I'm trying to do this, but it always redirects to http://127.0.0.1/login?next=%2F and I want this: http://127.0.0.1/pgadmin4/login?next=%2F
pgadmin4:
<<: *default-opts
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
networks:
- ntw_front
- portainer
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role==manager]
restart_policy:
condition: on-failure
resources:
limits:
cpus: '0.50'
memory: 128M
reservations:
memory: 9M
labels:
- "traefik.backend=pgadmin4"
- "traefik.frontend.rule=PathPrefixStrip:/pgadmin4"
- "traefik.port=80"
- "traefik.enable=true"
- "traefik.passHostHeader=true"
- "traefik.docker.network=ntw_front"
- "traefik.weight=10"
- "traefik.backend.loadbalancer.swarm=true"
- "traefik.backend.loadbalancer.method=drr"
## Bug fix / https://github.com/containous/traefik/issues/563#issuecomment-421360934
- "traefik.frontend.redirect.regex=^(.*)/pgadmin4$$"
- "traefik.frontend.redirect.replacement=$$1/pgadmin4/"
- "traefik.frontend.rule=PathPrefix:/pgadmin4;ReplacePathRegex: ^/pgadmin4/(.*) /$$1"
In the repo traefik-manager-noacme
,
If I put the container here domain.com/
it works normally. See branch 1.15
When I put the container domain.com/wordpress/
, it breaks.
Don't understand why as caddy, nginx, portainer works using PathPrefixStrip.
https://docs.traefik.io/v1.7/basics/#command-healthcheck
root@vpstest:~/deploy-setup# docker exec -it d79258e8c657 sh
/ # traefik healthcheck
Error calling healthcheck: please enable `ping` to use health check
Hey Folks!
I just finished a Docker Stack 3.1 compose file docker swarm mode
. It work perfectly with play-with-docker and on my nodes. It rocks!
It runs:
1 instance of Traefik
3 instance of caddy
3 instance of caddy
3 instance of who by Emile
Now Iām trying to make it works with ACME and Iām stucked. Is there any gents who would enjoy adapting my Docker Stack with ACME and make the TLS magic happen?
Many cheers!
Pascal
https://github.com/pascalandy/docker-stack-this/tree/master/traefik-manager
P.S. This git project also have a setup where Traefik runs on workers nodes.
Was ask on Slack
Need to try this solution
I need to review this:
toolproxy_socat.1.dog9q51gwkl3@node1 | standard_init_linux.go:211: exec user process caused "cannot allocate memory"
Traefik will not have direct access to docker daemon and haproxy will log suspicious connections.
using caddy:1.0.1
This image is stable in my prod. It should not be hard to make it work in this stack :)
In this case, we need to bypass socat
wip
Per example: traefik/traefik#766 (comment)
I'll test them and see if I should integrate them
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.