mirror of
https://gitlab.com/rusty-bever/deployment.git
synced 2026-04-08 16:35:48 +02:00
first part of config
This commit is contained in:
commit
8ee7c76f64
30 changed files with 729 additions and 0 deletions
30
roles/traefik-deploy/templates/traefik-stack.yml.j2
Normal file
30
roles/traefik-deploy/templates/traefik-stack.yml.j2
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# vim: ft=yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: 'traefik:2.5'
|
||||
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
|
||||
networks:
|
||||
- public
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
volumes:
|
||||
- '/srv/traefik.yml:/etc/traefik/traefik.yml'
|
||||
- 'acme:/etc/traefik/acme'
|
||||
- '/var/run/docker.sock:/var/run/docker.sock'
|
||||
|
||||
networks:
|
||||
public:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
acme:
|
||||
28
roles/traefik-deploy/templates/traefik.yml.j2
Normal file
28
roles/traefik-deploy/templates/traefik.yml.j2
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# vim: ft=yaml
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":80"
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
websecure:
|
||||
address: ":443"
|
||||
|
||||
api:
|
||||
insecure: true
|
||||
|
||||
providers:
|
||||
docker:
|
||||
swarmMode: true
|
||||
exposedbydefault: false
|
||||
network: public
|
||||
|
||||
certificatesResolvers:
|
||||
letsEncrypt:
|
||||
acme:
|
||||
email: "{{ letsencrypt_email }}"
|
||||
storage: "/etc/traefik/acme/acme.json"
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
Loading…
Add table
Add a link
Reference in a new issue