wip
This commit is contained in:
parent
f5ab14d383
commit
33c37f8e44
26
shlax/repo/traefik.py
Executable file
26
shlax/repo/traefik.py
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env shlax
|
||||
from shlax import *
|
||||
|
||||
main = Container(
|
||||
image='traefik:v2.0.0',
|
||||
networks=['web'],
|
||||
command=[
|
||||
'--entrypoints.web.address=:80',
|
||||
'--providers.docker',
|
||||
'--api',
|
||||
],
|
||||
ports=[
|
||||
'80:80',
|
||||
'443:443',
|
||||
],
|
||||
volumes=[
|
||||
'/var/run/docker.sock:/var/run/docker.sock:ro',
|
||||
'/etc/traefik/acme/:/etc/traefik/acme/',
|
||||
'/etc/traefik/htpasswd:/htpasswd:ro',
|
||||
],
|
||||
labels=[
|
||||
'traefik.http.routers.traefik.rule=Host(`{{ url.split("/")[2] }}`)',
|
||||
'traefik.http.routers.traefik.service=api@internal',
|
||||
'traefik.http.routers.traefik.entrypoints=web',
|
||||
]
|
||||
)
|
||||
Loading…
x
Reference in New Issue
Block a user