Browse Source

Merge branch 'master' into 'master'

redirect www without sed, refs #48

See merge request altermediatic/docker-atelier!2
Guilhem Saurel 7 years ago
parent
commit
8fce9bc7a3
2 changed files with 3 additions and 4 deletions
  1. 1 1
      setup.sh.dist
  2. 2 3
      traefik/traefik.toml

+ 1 - 1
setup.sh.dist

@@ -42,4 +42,4 @@ echo "ETHERPAD_DB_PASSWORD=$CHATONS_MYSQL_ROOT_PASSWORD" >> pad/.env
 mkdir -p "$CHATONS_ROOT_DIR/traefik"
 touch "$CHATONS_ROOT_DIR/traefik/acme.json"
 chmod 600 "$CHATONS_ROOT_DIR/traefik/acme.json"
-sed "s/###DOMAIN###/$CHATONS_DOMAIN/g" traefik/traefik.toml > "$CHATONS_ROOT_DIR/traefik/traefik.toml"
+cp traefik/traefik.toml "$CHATONS_ROOT_DIR/traefik/traefik.toml"

+ 2 - 3
traefik/traefik.toml

@@ -16,9 +16,8 @@ defaultEntryPoints = ["https","http"]
     [entryPoints.https.redirect]
     # For this to work, there must be a corresponding frontend rule
     # See https://github.com/containous/traefik/issues/919#issuecomment-311033114
-    # TODO For now the setup script replace those placeholders
-    regex = "^https://www.###DOMAIN###/(.*)"
-    replacement = "https://###DOMAIN###/$1"
+    regex = "^https://www.(.*)"
+    replacement = "https://$1"
   [entryPoints.https.tls]
 
 [docker]