diff --git a/README.md b/README.md index d436443..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 @@ -64,7 +66,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