spiral / app

Spiral Framework Skeleton HTTP Application: Queue, Console, Cycle ORM
https://spiral.dev/
MIT License
191 stars 20 forks source link

Sprial cannot be downloaded from spiral get-binary for Chinese users #26

Closed fengahan closed 2 years ago

fengahan commented 4 years ago

the network will timeout when Chinese user to execute vendor/bin/spiral , so a binary image should be added

wolfy-j commented 4 years ago

Can you try to download it directly from GitHub? Is it being blocked by the Chinese firewall?

krwu commented 4 years ago

Can you try to download it directly from GitHub? Is it being blocked by the Chinese firewall?

It is not blocked by GFW of China, but it's very slow for Chinese developers to download assets from github(with s3 CDN).

wolfy-j commented 4 years ago

Any recommendations? I'm not able to debug it from my end. We can increase the timeout.

krwu commented 4 years ago

My recommendations:

  1. Download the binary from a mirror URL instead of github release. The problem is S3 storage used by github.
  2. You can support an environment variable like SPIRAL_BINARY_MIRROR, when there is such variable in user's enviroment, use it. (Like puppeteer, node-sass, node-sqlite3...)
krwu commented 4 years ago

@wolfy-j You can contact "jsdelivr", they can provide free CDN for spiral's binary. It works perfectly both inside and outside China. Their CDN wat provided by MaxCDN, Cloudflare, Fastly and Quantil.

See jsdelivr's readme:

We can work together and setup a custom configuration for your project. This way, you can have full control over your files and the ability to utilize the full power of jsDelivr.

This kind of custom hosting can be suitable for:

  • Binary hosting. Windows executable files and zips.
  • Frequently updated files.
  • Projects that can't follow jsDelivr file structure.
  • Some other use that will blow all of our minds.

Simply send an email to dak@prospectone.io with a request for more information.

Current OSS projects using custom configs:

  • webjars
  • webpack webpackbin and codesandbox
wolfy-j commented 4 years ago

Thank you for the suggestion! I'll add this thing to our pipeline.

fengahan commented 4 years ago

thank u

wolfy-j commented 4 years ago

Please try to download directly from GitHub in the meantime. I can not provide you a clear ETA at the moment.

fengahan commented 4 years ago

I downloaded through some tools and it can be used normally at present, but the current situation is very unfriendly to most Chinese users

krwu commented 4 years ago

I downloaded through some tools and it can be used normally at present, but the current situation is very unfriendly to most Chinese users

you can use https://github.com/nkbai/githubdns to solve this issue temporarily.