Download the PHP package realshadow/satis-control-panel without Composer

On this page you can find all versions of the php package realshadow/satis-control-panel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package satis-control-panel

Scrutinizer Code Quality Build Status

Satis Control Panel

Satis Control Panel (SCP) is a simple web UI for managing your Satis Repository for Composer Packages.

SCP backend is written in Laravel and with a React + Typescript combo.

Features

Installation

You can install SCP directly with Composer by running

After that you can rename example.env to .env and set required configuration options.

Building javascript

During development you can start Webpack dev server with

or run Gulp watcher for less files with

Satis configuration file

In resources/ directory you will find satis.json.dist file which holds default Satis configuration, copy this file and rename it to satis.json and edit the name and homepage property.

When you are done, you have to set correct permissions for your configuration file for web user. E.g. www-data, should be able to read/write this file). More in next Permissions section.

Permissions

For building to work correctly you have to set correct permissions to few directories/directories:

Each directory/file should be readable/writable by web user, e.g. www-data. For example:

Webserver setup

Your document root should point to the public folder in the root as per default Laravel setup

Apache - example vhost

Nginx - example vhost

Visiting your control panel and generated packages

The control panel is located at http://{host}/control-panel and the packages will be generated (after first build of course) at http://{host}/public and http://{host}/private respectively.

Separating them like this adds a bit more configuration options. If for example you want to only use private packages, you can change the directory of private_repository configuration option to public instead of public/private and have your packages generated at http://{host} and still have a functioning control panel.

Configuration options

Here is a list of configuration options that can be set in config/satis.php (some of them can be set in .env file as well for convenience):

Option Description Default value Can be set in .env
config Path to satis configuration file resources/satis.json Yes
composer_home Composer home directory (thi storage/composer Yes
composer_cache Composer cache directory storage/composer/cache Yes
memory_limit Memory limit that will be set before running Satis build command 2G No
build_verbosity Verbosity of Satis build command (more info will be stored in logs) vvv No
private_repository Directory where Satis will generate private repository. This also serves as a way to distinguish public and private repositories in repository address, e.g. satis.example.com/private private No
public_repository Directory where Satis will generate public repository. This also serves as a way to distinguish public and private repositories in repository address, e.g. satis.example.com/public public No
proxy.http Proxy address that will be used by Satis/Composer for HTTP requests null Yes
proxy.https Proxy address that will be used by Satis/Composer for HTTPS requests null Yes
proxy.https See https://www.selenic.com/mercurial/hg.1.html#environment-variables for details null Yes

Note: if you change the default directory, remember to set correct permissions for your new directory.

How it works

SCP manages a single Satis configuration file which is generated on the fly when specific UI actions are performed. During each generation cycle the file is split into public and private repository configuration file, because private packages use funcionality that doesn't work well with Packagist (it will try to mirror whole Packagist repository).

Besides adding, editing and removing packages/repositories from configuration file, UI allows you to build/rebuild every package or run a complete rebuild of all registered packages/repositories.

Build process can run synchronously or asynchronously (by redirecting output to /dev/null and spawning a new process). By default, all builds run asynchronously, except on Windows where they are forced to run synchronously. This can be also forced during during API request by setting async_mode to false.

Missing or broken mirrored configuration files

Since the configuration files mirroring is triggered by any UI action, it is not always the correct behaviour. If you want to manually trigger config generation, for example when you make changes directly on the server, you can trigger the config generation with this artisan command

UI State

During build process whole UI is locked. During asynchronous builds UI state is handled by Node server, but running it is completely optional.

It can be started with

and will run on port 9010 by default. This can be changed in node/config.json file.

If for some reason UI will stay locked even though no packages are currently being build, it can be unlocked by running:

Composer auth

Composer file auth.json can be put in COMPOSER_HOME directory where you can put your Github token or credentials for needed for private repositories.

Private packages

Private packages are identified by repository URL address. When you will add/edit a new repository you can choose its type. By default, all repositories are considered as VCS repository. Building and rebuilding is handled by partial update functionality introduced in this PR only repositories that have a URL can be managed in UI. Those include:

Adding support for more repository types is planned in future.

Private packages use the repositories config key with require-all options set to true, thus all known packages are taken out of registered repositories, which means that Packagist must be disabled by default. This is handled when configs are split into private public part.

Public (packagist) packages

Public packages are used for mirroring of existing packages that can be installed from Packagist if you are behind a corporate proxy, thus speeding up overall development and deployment time.

All packages added here are fully mirrored with all their dependencies (but we still skip dev-dependencies). Currently only one version constraint is used and that's * so we can get a complete packagist clone.

Adding support for custom version constraints is planned in future.

Since full rebuild in this case could potentionally take few hours, you can use provided Cron task for a daily rebuild (see Cron task section).

Note though that you should not try to mirror whole Packagist repository!

RESTful API

SCP comes with built in API for esier integration with your favorite CI solution.

Private packages

Private packages use md5 encoded repository url as ID.

All methods return HTTP 404 if no repository is found.

Note: same API can be used for public packages as well by replacing repository by package. Although remote control of public packages is not necessary.

Additional API options

During both POST and PUT requests two additional options can be provided:

Logs

All logs can be found in storage/logs directory. Logs are divided into:

Cron task

Since mirroring of public packages can take some time and running full rebuild from UI is not a good idea, because this will lock it during the build process, SCP comes with a built in cron task that runs daily and will rebuild all repositories. It can be triggered with a cron entry similar to this:

Alternatively, you can add this cron entry:

This can be used for private packages as well

Atlassian plugins

SCP was created in an environment which uses Atlassian Stash and Bamboo as part of CI and thus two plugins were needed to completely integrate Composer packages into our build process.

Both use partial update functionality which was introduced in this PR.

TODO

PR's are welcome

Alternatives


All versions of satis-control-panel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
laravel/framework Version 5.1.*
jms/serializer Version ^1.0
composer/composer Version ^1.4
composer/satis Version ^1.0@alpha
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package realshadow/satis-control-panel contains the following files

Loading the files please wait ....