mirror
mirror copied to clipboard
Will it break the existing mirror if i migrate to this ?
Hi There
I am currently running a mirror in india (https://packagist.in/) and it uses https://github.com/webysther/packagist-mirror
and it runs mirror for V1. but i want to support V1 & V2
so i am planing on using this script. i can create my own home page but will this break existing users if i migrate to this script ?
No it should not break anything.. As long as you let it sync up before putting it in prod. The current version of webysther's mirror is actually breaking things for composer 2 users.
@Seldaek will this works with apache server or it requires nginx ? because webysther code requires nginx
It should work with apache I think, but I haven't tested it.. I added web server requirements now in the readme: https://github.com/composer/mirror/blob/master/README.md#requirements
@Seldaek thanks i will check . if any issues will get back to you
@Seldaek
i tried to run this inside cPanel and this script keeps getting errors
[24-Nov-2020 02:05:43 UTC] PHP Fatal error: Uncaught Symfony\Component\HttpClient\Exception\TransportException: Failure when receiving data from the peer for "https://repo.packagist.org/p/religis/utils$b060cc2de65557193dc7ae14ad74a4a9220c7e02b2395ccf884799cdba1c67ee.json". in /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/CurlResponse.php:297
Stack trace:
#0 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseTrait.php(326): Symfony\Component\HttpClient\Response\CurlResponse::perform(Object(Symfony\Component\HttpClient\Internal\CurlClientState), Array)
#1 [internal function]: Symfony\Component\HttpClient\Response\CurlResponse::stream(Array, NULL)
#2 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseStream.php(47): Generator->rewind()
#3 /home/packagist/public_html/mirror/mirror.php(421): Symfony\Component\HttpClient\Response\ResponseStream->rewind()
#4 /home/packagist/public_html/mirror/mirror.php(725): Mirror->sync()
#5 {main}
Next Symfony\Component\HttpClient\Exception\T in /home/packagist/public_html/mirror/vendor/symfony/http-client/Chunk/ErrorChunk.php on line 65
[24-Nov-2020 02:10:15 UTC] PHP Fatal error: Uncaught Symfony\Component\HttpClient\Exception\TransportException: Couldn't connect to server for "https://repo.packagist.org/p/sskaje/ipcalc$72514e9873ec7afecf8788fd62c05a2a6b7ceafe7c01cd484fadfbd08786a637.json". in /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/CurlResponse.php:297
Stack trace:
#0 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseTrait.php(326): Symfony\Component\HttpClient\Response\CurlResponse::perform(Object(Symfony\Component\HttpClient\Internal\CurlClientState), Array)
#1 [internal function]: Symfony\Component\HttpClient\Response\CurlResponse::stream(Array, NULL)
#2 /home/packagist/public_html/mirror/vendor/symfony/http-client/Response/ResponseStream.php(47): Generator->rewind()
#3 /home/packagist/public_html/mirror/mirror.php(421): Symfony\Component\HttpClient\Response\ResponseStream->rewind()
#4 /home/packagist/public_html/mirror/mirror.php(725): Mirror->sync()
#5 {main}
Next Symfony\Component\HttpClient\Exception\TransportExcepti in /home/packagist/public_html/mirror/vendor/symfony/http-client/Chunk/ErrorChunk.php on line 65
I tried increasing execution time & memory but nothing works. !!
Yeah sorry but I have no idea what might be causing this. Looks like poor network connectivity to me.
I have no ideas and experiences about running this mirror script inside cPanel.
But it's worked for me on a VPS (virtual private server) with Ubuntu 18.04.
Maybe I think it's about the temporary network connectivity.