Skip to content

Commit

Permalink
Development environment setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Jan 15, 2023
1 parent 945e80e commit 80c186e
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 35 deletions.
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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:[email protected]: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
-----
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
- [LDAP Configuration](authentication-ldap.md)

# Development
- [Contributing](dev/contributing.md)
- [Contributing](dev/CONTRIBUTING.md)
62 changes: 62 additions & 0 deletions docs/dev/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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:[email protected]: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
-----
33 changes: 0 additions & 33 deletions docs/dev/contributing.md

This file was deleted.

0 comments on commit 80c186e

Please sign in to comment.