Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down