Merge pull request #75 from tteck/main

[pull] main from tteck:main
This commit is contained in:
pull[bot]
2024-09-27 07:37:39 +00:00
committed by GitHub
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
msg_info "Updating ${APP} to ${RELEASE}" msg_info "Updating ${APP} to ${RELEASE}"
cd /opt/tianji cd /opt/tianji
git checkout -q v${RELEASE} git checkout -f -q v${RELEASE}
cd src/server
pnpm db:migrate:apply >/dev/null 2>&1 pnpm db:migrate:apply >/dev/null 2>&1
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}" msg_ok "Updated ${APP} to ${RELEASE}"
+1 -1
View File
@@ -147,7 +147,7 @@ Environment=NODE_ENV=production
Environment=PORT=3000 Environment=PORT=3000
Environment=WORKSPACE_DIR=/opt/browserless/workspace Environment=WORKSPACE_DIR=/opt/browserless/workspace
WorkingDirectory=/opt/browserless WorkingDirectory=/opt/browserless
ExecStart=/opt/browserless/start.sh ExecStart=/opt/browserless/scripts/start.sh
SyslogIdentifier=browserless SyslogIdentifier=browserless
[Install] [Install]
WantedBy=default.target WantedBy=default.target
+2 -2
View File
@@ -39,8 +39,8 @@ msg_ok "Installed Node.js"
msg_info "Setting up PostgreSQL" msg_info "Setting up PostgreSQL"
DB_NAME=ziplinedb DB_NAME=ziplinedb
DB_USER=zipline DB_USER=zipline
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
SECRET_KEY="$(openssl rand -base64 32 | cut -c1-24)" SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"