Update databasus-install.sh
This commit is contained in:
parent
c9d6f7ae55
commit
a73b00813d
@ -47,16 +47,13 @@ msg_ok "Built Databasus"
|
|||||||
msg_info "Configuring Databasus"
|
msg_info "Configuring Databasus"
|
||||||
JWT_SECRET=$(openssl rand -hex 32)
|
JWT_SECRET=$(openssl rand -hex 32)
|
||||||
ENCRYPTION_KEY=$(openssl rand -hex 32)
|
ENCRYPTION_KEY=$(openssl rand -hex 32)
|
||||||
|
|
||||||
# Create PostgreSQL version symlinks for compatibility
|
# Create PostgreSQL version symlinks for compatibility
|
||||||
for v in 12 13 14 15 16 18; do
|
for v in 12 13 14 15 16 18; do
|
||||||
ln -sf /usr/lib/postgresql/17 /usr/lib/postgresql/$v
|
ln -sf /usr/lib/postgresql/17 /usr/lib/postgresql/$v
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install goose for migrations
|
# Install goose for migrations
|
||||||
$STD go install github.com/pressly/goose/v3/cmd/goose@latest
|
$STD go install github.com/pressly/goose/v3/cmd/goose@latest
|
||||||
ln -sf /root/go/bin/goose /usr/local/bin/goose
|
ln -sf /root/go/bin/goose /usr/local/bin/goose
|
||||||
|
|
||||||
cat <<EOF >/opt/databasus/.env
|
cat <<EOF >/opt/databasus/.env
|
||||||
# Environment
|
# Environment
|
||||||
ENV_MODE=production
|
ENV_MODE=production
|
||||||
@ -166,6 +163,7 @@ ln -sf /etc/nginx/sites-available/databasus /etc/nginx/sites-enabled/databasus
|
|||||||
rm -f /etc/nginx/sites-enabled/default
|
rm -f /etc/nginx/sites-enabled/default
|
||||||
$STD nginx -t
|
$STD nginx -t
|
||||||
$STD systemctl enable -q --now nginx
|
$STD systemctl enable -q --now nginx
|
||||||
|
$STD systemctl reload nginx
|
||||||
msg_ok "Configured Nginx"
|
msg_ok "Configured Nginx"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user