Packages provides an interface and tools for maintaining a private Composer repository.
1.4K
Source code repository management made simple.
Packages is a PHP 5.6 and 7.x application providing an interface and tools for maintaining a private Composer repository. Packages extends Satis, adding a web frontend and useful management functionality like GitHub and GitLab integration.
Packages automatically registers GitLab and GitHub project webhooks to keep Satis up to date every time you push code. Packages also features a web management interface that allows for easy management of exposed packages and configured source control repositories.
Packages version 3 works on a plugin based system based around source code repositories. Packages can trigger, with each code push, many automated tasks like documentation generation or code analysis. The simple event-based architecture allows easy creation of new automation tasks.
Requirements:
Download the latest release, or clone the repository.
git clone [email protected]:terramar-labs/packages.git
Switch to the project root directory and run composer install.
cd packages
composer install
Copy config.yml.dist to config.yml and edit as appropriate.
cp config.yml.dist config.yml
vi config.yml
Packages uses Doctrine ORM to auto-generate the database schema for your configured platform.
bin/console orm:schema-tool:create
Start PHP's built-in webserver to run the Packages web application with minimal effort.
# Visit http://localhost:8080 to see the landing page.
php -S localhost:8080 -t web
For fully-automatic integration with GitHub, GitLab, and your Satis repository, you must always have at least one Resque worker running.
bin/console resque:worker:start
For more information on Resque workers, check the dedicated section.
Read the usage and design documentation for an overview of Packages functionality.
Visit index_dev.php in your browser to view the site with the dev environment configuration. In this env, views and the service container are not cached, so changes made are immediately visible.
Check out the Contributing Guide for the recommended way to set up your development environment.
Some tips:
views/.
prod env; use http://localhost:8080/index_dev.php to develop.views/base.html.twig, except forviews/Default/base.html.twig.web/images/, web/js/bootstrap.min.js, and such are symlinks pointing to the real files installed by Composer in vendor/.You can find a fully configured instance of Packages on Docker Hub.
After booting up the container you still need to create the database schema by running in the container bin/console orm:schema-tool:create.
This container does not apply migrations automatically, you'll have to run the migrations manually in the same fashion when updating the version.
The docker-compose file in this repository is great for local development use, but in production you should consider the following setup:
version: '2'
services:
packages:
image: mkerix/packages
environment:
PACKAGES_NAME: Name
PACKAGES_HOMEPAGE: Homepage
PACKAGES_CONTACT: [email protected]
PACKAGES_BASEPATH: https://satis.example.com
PACKAGES_USER: user
PACKAGES_PASSWORD: password
PACKAGES_PDO_PATH: '%app.root_dir%/database/database.sqlite'
volumes:
- /host/packages/database:/app/database
- /host/packages/satis:/app/satis
- /host/packages/ssh:/home/application/.ssh
redis:
image: redis
Adjust the environment variables as well as the volume links on the host to your liking and then generate a new SSH key and known_hosts file in the ssh folder. The generated public key needs to be added to a user with access to your composer repositories. This is needed so that Satis can pull the repositories successfully.
The following environment variables can optionally be used to configure your instance.
PACKAGES_NAME - instance namePACKAGES_HOMEPAGE - instance homepage linkPACKAGES_CONTACT - contact mailPACKAGES_BASEPATH - full base URL to the instancePACKAGES_SECURE - whether Satis should be secured too or notPACKAGES_USER - usernamePACKAGES_PASSWORD - passwordPACKAGES_PDO_DRIVER - pdo driverPACKAGES_PDO_PATH - path to the database file, e.g. for sqlitePACKAGES_PDO_HOST - database hostPACKAGES_PDO_USER - database userPACKAGES_PDO_PASSWORD - database passwordPACKAGES_PDO_DBNAME - database namePACKAGES_REDIS_HOST - Redis hostPACKAGES_REDIS_PORT - Redis portVisit the documentation to learn more.
index_dev.php contains a non-localhost block, comment it out when using Docker.bin/console command-line utility.packages.json file with the satis:build command.
bin/console satis:build
resque:queue:list command.
bin/console resque:queue:list
resque:worker:list command.
bin/console resque:worker:list
resque:worker:start.
bin/console resque:worker:start
tail -f logs/resque.log
chown -R application:application /app
Content type
Image
Digest
Size
328.2 MB
Last updated
about 7 years ago
docker pull mkerix/packages