tk-typo3/tk-composer-server

Serve composer packages to authorized accounts.

Installs: 33

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:typo3-cms-extension

1.4.0 2022-06-17 11:54 UTC

This package is auto-updated.

Last update: 2024-04-17 16:09:09 UTC


README

This is an extension for TYPO3 to host a composer server in a TYPO3 instance. Every package can have specific access rights to allow access only for authorized accounts (authorization method is http-basic, see here for further details). In addition, packages can be added to groups to easily build bundles for often used package collections.

Configuration

All configuration values are stored in $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tk_composer_server']....

Key: Type: Description: Default:
...['frontend']['disable'] boolean If true, Frontend is completely disabled. false
...['frontend']['title'] string Application title for frontend. Composer Server
...['frontend']['footer']['copyrightName'] string Name of the copyright holder. -
...['frontend']['footer']['copyrightHomepage'] string Homepage of the copyright holder. -
...['frontend']['footer']['copyrightNotice'] string Copyright notice in footer. All rights reserved.
...['frontend']['footer']['description'] string Short description text for footer. -
...['frontend']['cookieName'] string The cookie name for frontend login. auth
...['frontend']['cookieLifetime'] integer Duration in seconds the cookie is valid. 3600
...['frontend']['bruteForceSleepDuration'] integer Duration in seconds to sleep when trying to log in with invalid login credentials. 2
...['updateUri'] string The URL path to trigger the update command. Set this to empty to disable updates via URL. update
...['hashingAlgorithm'] string The hashing algorithm for package checksums. See here for other possible values. sha256
...['hostname'] string The hostname for the server, if not $_SERVER['HTTP_HOST']. Value of $_SERVER['HTTP_HOST']

Updating cached packages

There are three ways to update packages:

  1. Running console command.
  2. Running task via TYPO3 scheduler (extension scheduler required) to trigger console command.
  3. Request update URL.

Console command

To update cached packages via console, run the following command:

./vendor/bin/typo3 composer-server:update

Optionally, the package updates can be forced (even if no changes exist) with the --force-reload flag (or just -f):

./vendor/bin/typo3 composer-server:update --force-reload

TYPO3 scheduler task

Add a new task in TYPO3 scheduler to trigger the console command composer-server:update .

Request update URL

By default, the update URL is /update (configurable through extension configuration). Git hooks are a good way to trigger this only when changes are pushed. Therefore, the update is only running when necessary.