From 3ed03925b8f9e83442990d4852fd550cc9f2d728 Mon Sep 17 00:00:00 2001 From: Jannik Date: Sun, 26 Aug 2018 21:49:50 +0200 Subject: [PATCH 1/2] Fix #1 --- README.md | 3 ++- entrypoint.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d436443..4d89f68 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,8 @@ README. This requires defining two additional environment variables: * **USE_SECRET**: this variable must be set to 'yes' (lowercase). -* **SECRET (optional)**: the secret you want to use. +* **SECRET (optional)**: the secret you want to use. Please do not use the `|` + character in the secret. In case you do not specify a secret, it will be automatically generated. In that case, you'll need to check the container logs and look for the string "Secret to diff --git a/entrypoint.sh b/entrypoint.sh index ac0ea8e..1b15a54 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,9 +8,9 @@ function startup { echo "Secret to send posts with: $SECRET" # Replaces REPO_URL for the one passed as an environment variable. - sed -i 's@REPO_URL@'"$REPO_URL"'@g' /bin/generate-html.sh + sed -i 's|REPO_URL|'"$REPO_URL"'|g' /bin/generate-html.sh # Replaces SECRET expected in posts requests for the randomly generated one. - sed -i 's@__SECRET@'"$SECRET"'@g' /bin/generate-html.sh + sed -i 's|__SECRET|'"$SECRET"'|g' /bin/generate-html.sh echo "www-data ALL=(root) NOPASSWD: /bin/generate-html.sh" >> /etc/sudoers htpasswd -bc /etc/nginx/.htpasswd $HTTP_USER $HTTP_PASS From 35330290c2ec3bdfcaadacc64f5433fce48367db Mon Sep 17 00:00:00 2001 From: Jannik Date: Sun, 26 Aug 2018 21:59:56 +0200 Subject: [PATCH 2/2] Add: Comment for private repos --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d89f68..30226d2 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,9 @@ required): * **HTTP_USER**: username for HTTP authentication. * **HTTP_PASS**: password for HTTP authentication. -* **REPO_URL**: git repository URL to clone from. +* **REPO_URL**: git repository URL to clone from. In case you're using a private + GitHub repository, you can specify the GitHub username and password like this: + `https://username:password@github.com/username/repository` ## Automated deployment