-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
21 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,9 +1,9 @@ | ||
Packeton - Private PHP package repository for vendors | ||
====================================================== | ||
|
||
[](https://packagist.org/packages/okvpn/packeton) | ||
[](https://hub.docker.com/r/okvpn/packeton) | ||
[](https://hub.docker.com/r/okvpn/packeton) | ||
[](https://packagist.org/packages/packeton/packeton) | ||
[](https://hub.docker.com/r/packeton/packeton) | ||
[](https://hub.docker.com/r/packeton/packeton) | ||
[](https://packagist.org/packages/okvpn/packeton) | ||
|
||
Fork of [Packagist](https://github.com/composer/packagist). | ||
|
@@ -57,7 +57,7 @@ Table of content | |
|
||
Demo | ||
---- | ||
See our [Administration Demo](https://pkg.okvpn.org). Username/password (admin/composer) | ||
See our [Administration Demo](https://demo.packeton.org). Username/password (admin/123456) | ||
|
||
[](docs/img/demo.png) | ||
|
||
|
@@ -73,10 +73,15 @@ docker run -d --name packeton \ | |
packeton/packeton:latest | ||
``` | ||
|
||
After container is running, you may wish to create a admin user via command `packagist:user:manager` | ||
``` | ||
docker exec -it packeton bin/console packagist:user:manager admin --password=123456 --admin | ||
``` | ||
|
||
Or build and run docker container with docker-compose: | ||
|
||
- [docker-compose.yml](./docker-compose.yml) Single container example, here the container runs supervisor that to start | ||
over jobs: nginx, redis, php-fpm, cron, worker. However, it does not follow the docker best-practises | ||
other jobs: nginx, redis, php-fpm, cron, worker. However, it does not follow the docker best-practises | ||
where 1 service must be per container. But it is very easy to use and KISS principle | ||
|
||
- [docker-compose-prod.yml](./docker-compose-prod.yml) - multiple containers, where 1 service per container | ||
|
@@ -170,16 +175,12 @@ structure must be like this. | |
|
||
``` | ||
└── /var/www/ | ||
├── .ssh/ # ssh keys directory | ||
│ ├── config | ||
│ ├── id_rsa # main ssh key | ||
│ ├── private_key_2 # additional ssh key | ||
│ └── private_key_3 | ||
│ | ||
└── .composer/ # composer home | ||
├── auth.json | ||
└── config.json | ||
└── .ssh/ # ssh keys directory | ||
├── config | ||
├── id_rsa # main ssh key | ||
├── private_key_2 # additional ssh key | ||
└── private_key_3 | ||
``` | ||
|
||
Example ssh config for multiple SSH Keys for different github account/repos, | ||
|
@@ -278,8 +279,8 @@ from a git post-receive hook or similar. You have to do a POST request to | |
} | ||
``` | ||
|
||
Also you can overwrite regex that was used to parse the repository url, | ||
see [ApiController](src/Packagist/WebBundle/Controller/ApiController.php#L348) | ||
Also, you can overwrite regex that was used to parse the repository url, | ||
see [ApiController](src/Controller/ApiController.php#L348) | ||
|
||
``` | ||
{ | ||
|
@@ -371,7 +372,7 @@ payload according to your rules. | |
|
||
Usage and Authentication | ||
------------------------ | ||
By default admin user have access to all repositories and able to submit packages, create users, view statistics. | ||
By default, admin user have access to all repositories and able to submit packages, create users, view statistics. | ||
The customer users can only see related packages and own profile with instruction how to use api token. | ||
|
||
To authenticate composer access to repository needs add credentials globally into auth.json, for example: | ||
|
@@ -399,9 +400,15 @@ Configure this private repository in your `composer.json`. | |
|
||
### Create admin and maintainer users. | ||
|
||
Only admin and maintainer user can submit a new package. | ||
Only admin user can create the new customer users. | ||
You can create an user and then promote to admin or maintainer via console using fos user bundle commands. | ||
|
||
**Application Roles** | ||
|
||
- ROLE_USER - minimal access level, these users only can read metadata only for selected packages. | ||
- ROLE_FULL_CUSTOMER - Can read all packages metadata. | ||
- ROLE_MAINTAINER - Can submit a new package and read all metadata. | ||
- ROLE_ADMIN - Can create a new customer users, management webhooks and credentials. | ||
|
||
You can create a user and then promote to admin or maintainer via console using fos user bundle commands. | ||
|
||
``` | ||
php bin/console packagist:user:manager username [email protected] --password=123456 --admin # create admin user | ||
|
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