This repository has been archived on 2023-02-03. You can view files and clone it, but cannot push or open issues or pull requests.
2020-03-31 12:37:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
# Fire up Jekyll with the right configuration
|
|
|
|
run_jekyll() {
|
|
|
|
set -eu
|
|
|
|
|
2020-04-06 09:46:59 +00:00
|
|
|
local args="--port $JEKYLL_PORT --host $JEKYLL_HOST --trace"
|
|
|
|
|
|
|
|
# Note(decentral1se): handle the case where the Dokku is deploying the app
|
|
|
|
# with HTTP support only before we have a chance to deploy the lets encrypt
|
|
|
|
# certificates and mount them into the container
|
|
|
|
if [ -f "$JEKYLL_SSL_CERT" ]; then
|
|
|
|
args="${args} --ssl-cert $JEKYLL_SSL_CERT"
|
|
|
|
fi
|
|
|
|
if [ -f "$JEKYLL_SSL_KEY" ]; then
|
|
|
|
args="${args} --ssl-key $JEKYLL_SSL_KEY"
|
|
|
|
fi
|
|
|
|
|
|
|
|
jekyll serve "$args"
|
2020-03-31 12:37:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Main entrypoint
|
|
|
|
main() {
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
run_jekyll
|
|
|
|
}
|
|
|
|
|
|
|
|
main
|