diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..ecf7cf6a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,74 @@ +# Contributing + +Everyone is welcome to contribute code to [https://github.com/vtsykun/packeton.git](https://github.com/vtsykun/packeton.git) + +### 1. Development environment. + +If you are running Windows, the Windows Subsystem for Linux (WSL) is recommended for development. +But the most of the features will work on Windows too. +The code of Packeton is written in PHP, Symfony framework. + +#### Requirements + +- PHP 8.1+ +- Redis (or Docker) for some functionality. +- (optional) nginx / php-fpm to run the web server. +- (optional) MySQL or PostgresSQL for the main data store, default SQLite. + +### 2. Get the source. + +Make a fork on GitHub, and then create a pull request to provide your changes. + +``` +git clone git@github.com:YOUR_GITHUB_NAME/packeton.git +git checkout -b fix/patch-1 +``` + +### 3. Install the dependencies + +Run composer install + +``` +cd packeton +composer install +``` + +### 4. Configure your env vars. + +Create a file `.env.local` with following content. + +``` +# .env.local + +APP_ENV=dev + +# select database, default SQLite +DATABASE_URL="postgresql://postgres:123456@127.0.0.1:5432/packeton?serverVersion=12&charset=utf8" +``` + +### 5. Setup database + +``` +bin/console doctrine:schema:update --dump-sql --force +``` + +### 6. Run local webserver. + +``` +php -S localhost:8000 -t public/ +``` + +Optional, to create admin user use the command: + +``` +php bin/console packagist:user:manager admin --password=123456 --admin +``` + +To run sync workers: + +``` +php bin/console packagist:run-workers -vvv +``` + +ENJOY +----- diff --git a/README.md b/README.md index ecbeba5b..ab288ff0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Packeton - Private PHP package repository for vendors Fork of [Packagist](https://github.com/composer/packagist). The Open Source alternative of [Private Packagist for vendors](https://packagist.com), that based on [Satis](https://github.com/composer/satis) and [Packagist](https://github.com/composer/packagist). -**All** documentation here [docs.packeton.org](https://docs.packeton.org/) +**Full documentation** [docs.packeton.org](https://docs.packeton.org/) ### Legacy Symfony 3.4 version diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index e56304f3..8fda69fa 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -23,4 +23,4 @@ - [LDAP Configuration](authentication-ldap.md) # Development - - [Contributing](dev/contributing.md) + - [Contributing](dev/CONTRIBUTING.md) diff --git a/docs/dev/CONTRIBUTING.md b/docs/dev/CONTRIBUTING.md new file mode 100644 index 00000000..2d1549c4 --- /dev/null +++ b/docs/dev/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contributing + +Everyone is welcome to contribute code to [https://github.com/vtsykun/packeton.git](https://github.com/vtsykun/packeton.git) + +### 1. Development environment. + +If you are running Windows, the Windows Subsystem for Linux (WSL) is recommended for development. +But the most of the features will work on Windows too. +The code of Packeton is written in PHP. + +#### Requirements + +- PHP 8.1+ +- Redis (or Docker) for some functionality. +- (optional) nginx / php-fpm to run the web server. +- (optional) MySQL or PostgresSQL for the main data store, default SQLite. + +### 2. Get the source. + +Make a fork on GitHub, and then create a pull request to provide your changes. + +``` +git clone git@github.com:YOUR_GITHUB_NAME/packeton.git +git checkout -b fix/patch-1 +``` + +### 3. Install the dependencies + +Run composer install + +``` +cd packeton +composer install +``` + +### 4. Configure your env vars. + +Create a file `.env.local` with following content. + +``` +# .env.local + +APP_ENV=dev + +# select database, default SQLite +DATABASE_URL="postgresql://postgres:123456@127.0.0.1:5432/packeton?serverVersion=12&charset=utf8" +``` + +### 5. Setup database + +``` +bin/console doctrine:schema:update --dump-sql --force +``` + +### 6. Run local webserver. + +``` +php -S localhost:8000 -t public/ +``` + +ENJOY +----- diff --git a/docs/dev/contributing.md b/docs/dev/contributing.md deleted file mode 100644 index 7141a77b..00000000 --- a/docs/dev/contributing.md +++ /dev/null @@ -1,33 +0,0 @@ -# Contributing - -Everyone is welcome to contribute code to https://github.com/vtsykun/packeton.git - -### 1. Development environment. - -If you are running Windows, the Linux Windows Subsystem (WSL) is recommended for development. -The code of Packeton is written in PHP. - -#### Requirements - -- PHP 8.1+ -- Redis (or Docker) for some functionality. -- Symfony CLI / nginx / php-fpm to run the web server. -- (optional) MySQL or PostgresSQL for the main data store, default SQLite. - -### 2. Get the source. - -Make a fork on GitHub, and then create a pull request to provide your changes. - -``` -git clone git@github.com:YOUR_GITHUB_NAME/packeton.git -git checkout -b patch-1 -``` - -### 4. Install the dependencies - -Run composer install - -``` -cd packeton -composer install -```