@@ -33,7 +33,7 @@ msg_ok "Set up Node.js Repository"
3333msg_info " Installing Node.js"
3434$STD apt-get update
3535$STD apt-get install -y nodejs
36- $STD npm install -g yarn
36+ $STD npm install -g pnpm
3737msg_ok " Installed Node.js"
3838
3939msg_info " Setting up PostgreSQL"
@@ -60,13 +60,15 @@ wget -q "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip"
6060unzip -q v${RELEASE} .zip
6161mv zipline-${RELEASE} /opt/zipline
6262cd /opt/zipline
63- mv .env.local.example .env
64- sudo sed -i " s|CORE_SECRET=.*|CORE_SECRET=\" $SECRET_KEY \" |" /opt/zipline/.env
65- sudo sed -i " s|CORE_RETURN_HTTPS=.*|CORE_RETURN_HTTPS=false|" /opt/zipline/.env
66- sudo sed -i " s|CORE_DATABASE_URL=.*|CORE_DATABASE_URL=\" postgres://$DB_USER :$DB_PASS @localhost:5432/$DB_NAME \" |" /opt/zipline/.env
63+ cat << EOF >/opt/zipline/.env
64+ DATABASE_URL=postgres://$DB_USER :$DB_PASS @localhost:5432/$DB_NAME
65+ CORE_SECRET=$SECRET_KEY
66+ CORE_HOSTNAME=0.0.0.0
67+ CORE_PORT=3000
6768CORE_RETURN_HTTPS=false
68- $STD yarn install
69- $STD yarn build
69+ EOF
70+ $STD pnpm install
71+ $STD pnpm build
7072echo " ${RELEASE} " > " /opt/${APPLICATION} _version.txt"
7173msg_ok " Installed Zipline"
7274
@@ -78,18 +80,17 @@ After=network.target
7880
7981[Service]
8082WorkingDirectory=/opt/zipline
81- ExecStart=/usr/bin/yarn start
83+ ExecStart=/usr/bin/pnpm start
8284Restart=on-failure
8385
8486[Install]
8587WantedBy=multi-user.target
8688EOF
87- systemctl enable -q --now zipline.service
89+ systemctl enable -q --now zipline
8890msg_ok " Created Service"
8991
9092motd_ssh
9193customize
92-
9394msg_info " Cleaning up"
9495$STD apt-get -y autoremove
9596$STD apt-get -y autoclean
0 commit comments