change to yq
This commit is contained in:
parent
51ebe9eb79
commit
ce17b773b4
@ -13,10 +13,14 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt-get install -y yq
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION="16" install_postgresql
|
PG_VERSION="16" install_postgresql
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL Database"
|
msg_info "Setting up PostgreSQL Database"
|
||||||
DB_NAME=hanko_db
|
DB_NAME=hanko
|
||||||
DB_USER=hanko
|
DB_USER=hanko
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||||
APP_SECRET=$(openssl rand -base64 32)
|
APP_SECRET=$(openssl rand -base64 32)
|
||||||
@ -36,14 +40,14 @@ msg_ok "Set up PostgreSQL Database"
|
|||||||
msg_info "Setup Hanko"
|
msg_info "Setup Hanko"
|
||||||
fetch_and_deploy_gh_release "hanko" "teamhanko/hanko" "prebuild" "latest" "/opt/hanko" "hanko_Linux_x86_64.tar.gz"
|
fetch_and_deploy_gh_release "hanko" "teamhanko/hanko" "prebuild" "latest" "/opt/hanko" "hanko_Linux_x86_64.tar.gz"
|
||||||
curl -fsSL https://raw.githubusercontent.com/teamhanko/hanko/refs/heads/main/backend/config/config.yaml -o /opt/hanko/config.yaml
|
curl -fsSL https://raw.githubusercontent.com/teamhanko/hanko/refs/heads/main/backend/config/config.yaml -o /opt/hanko/config.yaml
|
||||||
sed -i "
|
yq e "
|
||||||
s|^\(\s*user:\s*\).*|\1${DB_USER}|;
|
.database.user = strenv(DB_USER) |
|
||||||
s|^\(\s*password:\s*\).*|\1${DB_PASS}|;
|
.database.password = strenv(DB_PASS) |
|
||||||
s|^\(\s*host:\s*\).*|\1localhost|;
|
.database.host = \"localhost\" |
|
||||||
s|^\(\s*port:\s*\).*|\1\"5432\"|;
|
.database.port = \"5432\" |
|
||||||
s|^\(\s*dialect:\s*\).*|\1postgres|;
|
.database.dialect = \"postgres\" |
|
||||||
s|^\(\s*-\s*\).*abcdefghijklmnopqrstuvwxyz.*|\1${APP_SECRET}|;
|
.app.secret = strenv(APP_SECRET)
|
||||||
" /opt/hanko/config.yaml
|
" -i /opt/hanko/config.yaml
|
||||||
msg_ok "Setup Hanko"
|
msg_ok "Setup Hanko"
|
||||||
|
|
||||||
msg_info "Setup Service"
|
msg_info "Setup Service"
|
||||||
@ -54,7 +58,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/opt/hanko/hanko serve --config /opt/hanko/config.yaml
|
ExecStart=/opt/hanko/hanko serve all --config /opt/hanko/config.yaml
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user