This publish exhibits you tips on how to deploy zfile utilizing Docker. It demonstrates the steps deploying to on-line cloud suppliers corresponding to fly.io, Zeahur, Koyeb, .
Zfile
Github: https://github.com/zfile-dev/zfile
ZFile is an internet cloud disk (listing listing) program appropriate for people. It may well unify your storage sources of varied storage sorts into one internet web page for viewing, previewing, and upkeep. You now not must log in to varied internet pages to handle recordsdata. Now you solely want to make use of it in ZFile. You solely must fill within the related info of the storage supply. Different token refreshes and authorizations are as automated as doable, and there are entire paperwork that can assist you use it.
- Helps docking with S3, OneDrive, SharePoint, Google Drive, Duoji Cloud, Youpai Cloud, native storage, FTP, SFTP and different storage sources
- Helps on-line searching of images, enjoying of audio and video, textual content recordsdata, Workplace, obj (3d) and different file sorts.
Demo website: https://demo.zfile.vip
System options:
Docker
,Docker Compose
assist (amd64/arm64)- Responsive design, multi-terminal compatibility
- Assist file operations: add, obtain, rename, delete, create new folder, and so on.
- Identical operation expertise as native recordsdata, helps drag-and-drop choice,
Ctrl + Left Mouse click on
a number of choice,Shift + single click on
a number of choice,Ctrl + A
choose all, andEsc
deselect all - The add expertise is similar as native recordsdata, supporting
Ctrl + V
pasting and dragging to add recordsdata/folders . - Picture gallery mode, and helps customizing the variety of columns, spacing, and different info.
- Folder encryption
- Contents
readme
Documentation - File/Folder Hiding
- Customized
js
,css
- Assist on-line searching of textual content recordsdata, PDF, footage, music, and movies (assist mp4, flv, hls)
- File direct hyperlink and QR code
- Mount a number of storage insurance policies concurrently
- Helps S3 protocol, Alibaba Cloud OSS, FTP, Huawei Cloud OBS, native storage, MINIO, OneDrive Worldwide/Residence/Private/21Vianet/SharePoint, , Qiniu Cloud KODO, Tencent Cloud COS, and Youpai Cloud USS.
Docker picture: http://docker.io/zhaojun1998/zfile
Docker Run & Docker compose
Docker Run
docker run -d –identify=zfile –restart=at all times
-p 8080:8080
-v /root/zfile/db:/root/.zfile-v4/db
-v /root/zfile/logs:/root/.zfile-v4/logs
-v /root/zfile/file:/information/file
zhaojun1998/zfile:newest
Docker Compose:
Instructions:
- mkdir -p /root/information/docker_data/zfile
- cd /root/information/docker_data/zfile
- nano docker-compose.yml
Different Associated Instructions:
- lsof -i:8080 #examine if 8080 port has been occupied,if sure, change to completely different one, corresponding to 8090
- apt set up lsof #set up lsof
- cd /root/information/docker_data/zfile
- docker-compose up -d
Enterhttp://ip:8080
to go to the positioning.
Fly.io
https://fly.io/docs/about/pricing/#free-allowances
New join fly.io must pay $5 to remain a Passion plan after you used up $5 free trial credit score. However Legacy Passion Plan nonetheless has no month-to-month subscription price.
Free allowances. Sources included totally free on all plans:
- As much as 3 shared-cpu-1x 256mb VMs
- 3GB persistent quantity storage (whole)
- 160GB outbound information switch
1 Signal into your Fly.io account by typing flyctl auth login
PS C:UsersWDAGUtilityAccount> flyctl auth login
Opening https://fly.io/app/auth/cli/8e426809a69c7d38e2ca77e0f62ae57 ...
Ready for session... Executed
efficiently logged in as [email protected]
You can be prompted a login window in a browser. You should use both Github or Google account to login. After logged in efficiently, your flyctl needs to be related to your account, as present beneath.
2 Set up flyctl if you’re utilizing Home windows machine.
PS C:Usersjohn> iwr https://fly.io/set up.ps1 -useb | iex Downloading flyctl... flyctl was put in efficiently to C:Usersjohn.flybinflyctl.exe
Run 'flyctl --help' to get began
PS C:Usersjohn>
3 Shut CMD or Powershell terminal and open a brand new one to proceed subsequent command:
PS C:Usersjohn> fly launch
Scanning supply code
Couldn't discover a Dockerfile, nor detect a runtime or framework from supply code. Persevering with with a clean app.
Creating app in C:Usersjohn
We're about to launch your app on Fly.io. Here is what you are getting:
Group: Johnny Netsec (fly launch defaults to the private org)
Title: john-ancient-flower-3833 (generated)
Area: Toronto, Canada (that is the quickest area for you)
App Machines: shared-cpu-1x, 1GB RAM (most apps want about 1GB of RAM)
Postgres: (not requested)
Redis: (not requested)
Tigris: (not requested)
? Do you need to tweak these settings earlier than continuing? No
Created app 'john-ancient-flower-3833' in group 'private'
Admin URL: https://fly.io/apps/john-ancient-flower-3833
Hostname: john-ancient-flower-3833.fly.dev
Wrote config file fly.toml
PS C:Usersjohn>
Listed below are some CLI instructions :
Modify fly.toml
Default fly.toml file, which was generated from earlier “fly launch” command
PS C:Usersjohn> cat fly.toml
# fly.toml app configuration file generated for john-ancient-flower-3833 on 2025-01-22T07:43:31-05:00
#
# See https://fly.io/docs/reference/configuration/ for details about tips on how to use this file.
#
app = ‘john-ancient-flower-3833’
primary_region = ‘yyz’
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = ‘cease’
auto_start_machines = true
min_machines_running = 0
processes = [‘app’]
[[vm]]
reminiscence = ‘1gb’
cpu_kind = ‘shared’
cpus = 1
PS C:Usersjohn>
Now we have not deploied it but. Lets modify this fly.toml file to following instance for deploying zfile:
# fly.toml file generated for 51zfile
app = “51zfile” # change to no matter identify you need if the identify is just not occupied
kill_signal = “SIGINT”
kill_timeout = 5
processes = []
[build]
picture = “zhaojun1998/zfile” # Don’t change until you construct your personal picture
[env]
[mounts]
supply=”51zfile” # change to your fly.io quantity identify created in subsequent part
vacation spot=”/root/.zfile-v4″ # don’t change
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 8080 # change to port 5230
processes = [“app”]
protocol = “tcp”
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
sort = “connections”
[[services.ports]]
force_https = true
handlers = [“http”]
port = 80
[[services.ports]]
handlers = [“tls”, “http”]
port = 443
[[services.tcp_checks]]
grace_period = “1s”
interval = “15s”
restart_limit = 0
timeout = “2s”
1 Create a brand new 1GB disk in your persistent information
- fly volumes create 51zfile –measurement 1
2 Associated flyctl instructions
PS C:Usersjohn> flyctl –assist
That is flyctl, the Fly.io command line interface.
Utilization:
flyctl.exe [flags]
flyctl.exe [command]
Deploying apps & machines
apps Handle apps.
deploy Deploy Fly functions
launch Create and configure a brand new app from supply code or a Docker picture
machine Handle Fly Machines.
standing Present app standing
Configuration & scaling
certs Handle certificates
config Handle an app’s configuration
picture Handle app picture
ips Handle IP addresses for apps
scale Scale app sources
secrets and techniques Handle software secrets and techniques with the set and unset instructions.
volumes Handle Fly Volumes.
Monitoring & managing issues
checks Handle well being checks
console Run a console in a brand new or present machine
dashboard Open internet browser on Fly Internet UI for this app
dig Make DNS requests towards Fly.io’s inside DNS server
incidents Present incidents
logs View app logs
ping Check connectivity with ICMP ping messages
proxy Proxies connections to a Fly Machine.
releases Checklist app releases
providers Present the appliance’s providers
sftp Get or put recordsdata from a distant VM.
ssh Use SSH to log into or run instructions on Machines
wireguard Instructions that handle WireGuard peer connections
Databases & extensions
consul Allow and handle Consul clusters
extensions Extensions are extra performance that may be added to your Fly apps
litefs-cloud LiteFS Cloud administration instructions
mysql Provision and handle MySQL database clusters
postgres Handle Postgres clusters.
redis Launch and handle Redis databases managed by Upstash.com
storage Provision and handle Tigris object storage buckets
Entry management
auth Handle authentication
orgs Instructions for managing Fly organizations
tokens Handle Fly.io API tokens
Assist & troubleshooting
docs View Fly documentation
physician The DOCTOR command permits you to debug your Fly setting
platform Fly platform info
Extra Instructions:
agent Instructions that handle the Fly agent, a background course of that manages flyctl wireguard connections
completion Generate the autocompletion script for the required shell
assist Assist about any command
jobs Present jobs at Fly.io
settings Handle flyctl settings
synthetics Artificial monitoring
model Present model info for the flyctl command
Flags:
-t, –access-token string Fly API Entry Token
–debug Print extra logs and traces
-h, –assist assist for flyctl.exe
–verbose Verbose output
Use “flyctl.exe [command] –assist” for extra details about a command.
PS C:Usersjohn>
3 Associated flyctl quantity instructions
PS C:Usersjohn> flyctl quantity –assist
Handle Fly Volumes. Volumes are persistent storage for Fly Machines. Find out how how volumes work:
https://fly.io/docs/volumes/overview/.
Utilization:
flyctl.exe volumes [command]
Aliases:
volumes, quantity, vol
Out there Instructions:
create Create a brand new quantity for an app.
destroy Destroy a number of volumes.
lengthen Prolong a quantity to the required measurement.
fork Fork the required quantity.
listing Checklist the volumes related to an app.
present Present the small print of the required quantity.
snapshots Handle quantity snapshots.
replace Replace a quantity for an app.
Flags:
-h, –assist assist for volumes
World Flags:
-t, –access-token string Fly API Entry Token
–debug Print extra logs and traces
–verbose Verbose output
Use “flyctl.exe volumes [command] –assist” for extra details about a command.
PS C:Usersjohn>
4 flyctl quantity create 51zfile –measurement 1
PS C:Usersjohn> flyctl quantity create 51zfile –measurement 1
Warning! Each quantity is pinned to a particular bodily host. It is best to create two or extra volumes per software to av? Do you continue to need to use the volumes characteristic? Sure
Some areas require a Launch plan or increased (bom).N) y
See https://fly.io/plans to arrange a plan.
? Choose area: Toronto, Canada (yyz)
ID: vol_remy7o667loxqel4
Title: 51zfile
App: 51zfile
Area: yyz
Zone: 520a
Measurement GB: 1
Encrypted: true
Created at: 22 Jan 25 16:22 UTC
Snapshot retention: 5
Scheduled snapshots: true
PS C:Usersjohn>
PS C:Usersjohn> flyctl quantity listing
ID STATE NAME SIZE REGION ZONE ENCRYPTED ATTACHED VM CREATED AT
vol_remy7o667loxqel4 created 51zfile 1GB yyz 520a true 2 minutes in the past
PS C:Usersjohn> fly deploy
==> Verifying app config
Validating C:Usersjohnfly.toml
✓ Configuration is legitimate
--> Verified app config
==> Constructing picture
Looking for picture 'zhaojun1998/zfile' remotely...
picture discovered: img_3mno4w2dy794k18q
Watch your deployment at https://fly.io/apps/51zfile/monitoring
This deployment will:
* create 1 "app" machine
No machines in group app, launching a brand new machine
Completed launching new machines
-------
✔ Machine e82dd00f723748 [app] replace completed: success
-------
Checking DNS configuration for 51zfile.fly.dev
Go to your newly deployed app at https://51zfile.fly.dev/
PS C:Usersjohn>
Zeabur.com
Zeabur has a free tiral plan which provides you a chance to run your app for twenty-four hours with none costs. (Jan 22, 2025)
Deploy by way of Zeabur platform;s template: https://zeabur.com/templates/441Y8R
View Supply:
providers:
- identify: zfile
icon: https://uncooked.githubusercontent.com/ikxin/zeabur/primary/templates/zfile/icon.png
template: PREBUILT_V2
spec:
supply:
picture: zhaojun1998/zfile
ports:
- id: internet
port: 8080
sort: HTTP
volumes:
- id: db
dir: /root/.zfile-v4/db
- id: logs
dir: /root/.zfile-v4/logs
- id: file
dir: /information/file
domainKey: PUBLIC_DOMAIN
Deploy to free trial zone :
You’ll get following notification out of your deployed undertaking if you’re utilizing Free Trial layer service.
This undertaking is deployed in a free trial area and might be deleted after 24 hours.
Please choose different areas for deploying manufacturing initiatives
Render
https://dashboard.render.com/
Free Internet Service in Passion Plan: 512MB RAM and 0.1CPU. 100GB Free Bandwidth, 500 Minutes Free Pipeline/Month, Free PostgreSQL, Docker Builds, As much as 2 Customized Domains with Free TLS.
Koyeb
https://www.koyeb.com/
1x Internet Service, 1x Postgres, 5x customized domains, 100GB/month,
References
- Zeabur template: https://zeabur.com/templates/441Y8R