-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added full configuration for parallelism if mirror
- Loading branch information
Showing
7 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
# Folder used to save the files | ||
PUBLIC_DIR=public | ||
MIRROR=https://packagist.org | ||
URL=https://packagist.com.br | ||
|
||
# Main mirror used to get providers | ||
MAIN_MIRROR=packagist.org | ||
|
||
# Mirror snapshot capable, download a file | ||
# with all providers and repositories with | ||
# some days outdated, if dont exists show a | ||
# warning and fallback to full mode clone | ||
SNAPSHOT_MIRROR=packagist.com.br | ||
|
||
# Data mirror is the main and other mirrors | ||
# used to download repositories data | ||
DATA_MIRROR=packagist.jp,packagist.com.br,packagist.phpcomposer.com | ||
|
||
# URI of your mirror | ||
URL=packagist.com.br | ||
|
||
# Max connections by mirror | ||
MAX_CONNECTIONS=10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
coverage | ||
vendor | ||
legacy | ||
.env |
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Packagist Mirror. | ||
* | ||
* For the full license information, please view the LICENSE.md | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace League\Mirror\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Make a snapshot of all data to available to other mirror. | ||
* | ||
* @author Webysther Nunes <webysther@gmail.com> | ||
*/ | ||
class Snapshot extends Command | ||
{ | ||
/** | ||
* Console description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = <<<'TEXT' | ||
Make snapshot of mirror. | ||
<comment>Don't use this option if you plan for private mirror.</comment> | ||
|
||
TEXT; | ||
|
||
/** | ||
* Console params configuration. | ||
*/ | ||
protected function configure():void | ||
{ | ||
$this->setName('snapshot')->setDescription($this->description); | ||
} | ||
|
||
/** | ||
* Execution. | ||
* | ||
* @param InputInterface $input Input console | ||
* @param OutputInterface $output Output console | ||
* | ||
* @return int 0 if pass, any another is error | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output):int | ||
{ | ||
$input; | ||
$output; | ||
|
||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters