This repository has been archived on 2023-05-06. You can view files and clone it, but cannot push or open issues or pull requests.
pleroma-platform/.gitlab/ci/bin/update-config-for-testing
Dan Anglin 9b7e3f3955
feat: managing my Pleroma instance with GitOps.
This is a big milestone for me as this is the
first project where I completely set up GitOps for
managing my Pleroma platform.

[skip ci]
2020-06-28 03:02:20 +01:00

24 lines
931 B
Bash
Executable file

#!/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