diff --git a/bin/docker-create-project b/bin/docker-create-project index f65a6f6..48da61c 100755 --- a/bin/docker-create-project +++ b/bin/docker-create-project @@ -125,7 +125,7 @@ function create_docker_compose_file() rm "${compose_file}.bak" echo "Host: ${host}" - sed -i.bak "s#Host:.*#Host:${host}#g" "${compose_file}" + sed -i.bak "s#Host(.*#Host(\\\`${host}\\\`)#g" "${compose_file}" rm "${compose_file}.bak" echo "Document root: ${document_root}" diff --git a/traefik/docker-compose.yml b/traefik/docker-compose.yml index d7b167f..fd1ec48 100644 --- a/traefik/docker-compose.yml +++ b/traefik/docker-compose.yml @@ -8,12 +8,18 @@ networks: services: proxy: - image: traefik:v1.7.24 - command: --api --docker + image: traefik + command: + - --entrypoints.web.address=:80 + - --entrypoints.websecure.address=:443 + - --providers.docker + - --api container_name: traefik labels: - - traefik.frontend.rule=Host:traefik - - traefik.port=8080 + - "traefik.http.routers.proxy.rule=Host(`traefik`)" + - "traefik.http.routers.proxy.entrypoints=websecure" + - "traefik.http.routers.proxy.service=api@internal" + - "traefik.http.routers.proxy.tls=true" networks: - webgateway ports: diff --git a/traefik/traefik-sample.toml b/traefik/traefik-sample.toml index baaf449..2ce11ab 100644 --- a/traefik/traefik-sample.toml +++ b/traefik/traefik-sample.toml @@ -1,23 +1,21 @@ -debug = false - -logLevel = "ERROR" -defaultEntryPoints = ["https","http"] - -[entryPoints] - [entryPoints.http] +[entryPoints.web] address = ":80" - [entryPoints.http.redirect] - entryPoint = "https" - [entryPoints.https] + [entryPoints.web.http.redirections.entryPoint] + to = "websecure" + scheme = "https" + +[entryPoints.websecure] address = ":443" - [entryPoints.https.tls] - [[entryPoints.https.tls.certificates]] - certFile = "/etc/traefik/cert/traefik.crt" - keyFile = "/etc/traefik/cert/traefik.key" -[retry] +[[tls.certificates]] + certFile = "/etc/traefik/cert/traefik.crt" + keyFile = "/etc/traefik/cert/traefik.key" + +[api] + +[providers.docker] + endpoint = "unix:///var/run/docker.sock" + +[log] + level = "ERROR" -[docker] -endpoint = "unix:///var/run/docker.sock" -watch = true -exposedByDefault = false