Skip to content

Commit 6cdc26b

Browse files
authored
Refactor: Zipline (#9801)
* Refactor * Update icon URL
1 parent 92a2667 commit 6cdc26b

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

frontend/public/json/zipline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"interface_port": 3000,
1212
"documentation": "https://zipline.diced.sh/docs/get-started",
1313
"website": "https://zipline.diced.sh/",
14-
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@master/webp/zipline.webp",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/zipline.webp",
1515
"config_path": "/opt/zipline/.env",
1616
"description": "Zipline is a file-sharing and URL-shortening server designed for easy setup and extensive features. It allows users to upload files, organize them into folders, create shortened URLs, and manage uploads through a user-friendly dashboard. Additional features include image compression, video thumbnails, password protection, 2FA, OAuth2 registration, and API access for custom control. It supports integrations with platforms like Discord.",
1717
"install_methods": [

install/zipline-install.sh

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,15 @@ update_os
1616

1717
NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs
1818
PG_VERSION="17" setup_postgresql
19+
PG_DB_NAME="ziplinedb" PG_DB_USER="zipline" setup_postgresql_db
1920
fetch_and_deploy_gh_release "zipline" "diced/zipline" "tarball"
20-
21-
msg_info "Setting up PostgreSQL"
22-
DB_NAME=ziplinedb
23-
DB_USER=zipline
24-
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
2521
SECRET_KEY="$(openssl rand -base64 42 | tr -dc 'a-zA-Z0-9')"
26-
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
27-
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
28-
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
29-
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
30-
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
31-
{
32-
echo "Zipline-Credentials"
33-
echo "Zipline Database User: $DB_USER"
34-
echo "Zipline Database Password: $DB_PASS"
35-
echo "Zipline Database Name: $DB_NAME"
36-
echo "Zipline Secret Key: $SECRET_KEY"
37-
} >>~/zipline.creds
38-
msg_ok "Set up PostgreSQL"
22+
echo "Zipline Secret Key: ${SECRET_KEY}" >>~/zipline.creds
3923

4024
msg_info "Installing Zipline (Patience)"
4125
cd /opt/zipline || exit
4226
cat <<EOF >/opt/zipline/.env
43-
DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME
27+
DATABASE_URL=postgres://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME
4428
CORE_SECRET=$SECRET_KEY
4529
CORE_HOSTNAME=0.0.0.0
4630
CORE_PORT=3000

0 commit comments

Comments
 (0)