Minor edits
This commit is contained in:
@@ -4,14 +4,18 @@ set -eu
|
||||
usage="Usage: $0 server_name project_root"
|
||||
server_name="${1:?$usage}"
|
||||
root="${2:?$usage}"
|
||||
|
||||
# Configure hostname for Nginx
|
||||
sed -Ei "s/(^[[:blank:]]*server_name [^_][^.]*\.)[^;]*/\1${server_name}/" "$root"/services/nginx/default.conf
|
||||
|
||||
# Configure hostname for OpenProject
|
||||
sed -Ei "s/(^OPENPROJECT_HOST__NAME=[^.]*\.).*/\1${server_name}/" "$root"/.env
|
||||
|
||||
# Configure hostname for Gitea
|
||||
# Note that this works only if you use a docker volume named `tvcloud_gitea` (this project default).
|
||||
gitea_conf_file=/var/lib/docker/volumes/tvcloud_gitea/_data/gitea/conf/app.init
|
||||
if [[ ! -e $gitea_conf_file ]]; then
|
||||
mkdir -p $(dirname "$gitea_conf_file")
|
||||
mkdir -p "$(dirname "$gitea_conf_file")"
|
||||
touch "$gitea_conf_file"
|
||||
fi
|
||||
if grep -Eq "\[server\] ROOT_URL = https://gitea\." $gitea_conf_file; then
|
||||
|
||||
Reference in New Issue
Block a user