25 lines
931 B
Text
25 lines
931 B
Text
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -euo pipefail
|
||
|
|
||
|
CONFIGURATION_FILE=${PLEROMA_INFRASTRUCTURE_DIRECTORY}/ansible/inventory/free-flow/host_vars/free-flow/pleroma-configuration.yml
|
||
|
|
||
|
if [ "${PLEROMA_ENVIRONMENT:-nil}" == "testing" ]; then
|
||
|
|
||
|
# 1) Ensure vault secrets are retrieved from the development path.
|
||
|
# 2) Change instance name.
|
||
|
# 3) Change instance description.
|
||
|
# 4) Disable healthcheck.
|
||
|
# 5) Change the domain name.
|
||
|
# 6) Disable let's encrypt (until we get ngrok set up).
|
||
|
|
||
|
sed -i \
|
||
|
-e 's/secret=pleroma\/production/secret=pleroma\/development/g' \
|
||
|
-e 's/^.*instanceName:.*$/ instanceName: "Free Flow (Test Instance)"/' \
|
||
|
-e 's/^.*instanceDescription:.*$/ instanceDescription: "Pleroma test instance for Free Flow"/' \
|
||
|
-e 's/^.*healthCheck:.*$/ healthCheck: "false"/' \
|
||
|
-e "s/^.*host:.*$/ host: ${TESTING_PLEROMA_FQDN}/" \
|
||
|
${CONFIGURATION_FILE}
|
||
|
|
||
|
fi
|