Skip to content

newera-systems/repman

 
 

Repository files navigation

Repman - PHP Repository Manager

Minimum PHP Version buddy pipeline codecov License

Repman is a PHP repository manager. Main features:

  • free and open source
  • works as a proxy for packagist.org (speeds up your local builds)
  • hosts your private packages
  • allows to create individual access tokens
  • supports private package import from GitHub, GitLab and Bitbucket with one click

Documentation: https://repman.io/docs/

Requirements

  • PHP >= 7.4
  • PostgreSQL 11
  • var dir must be writeable
  • any web server

Installation

Docker

Ansible

Manual

git clone git@github.com:repman-io/repman.git
cd repman
composer install

Setup database:

bin/console doctrine:migrations:migrate
bin/console messenger:setup-transports

Configuration

Mailer

To configure mailer transport, enter connection details in the MAILER_DSN environment variable

MAILER_DSN=smtp://user:pass@smtp.example.com

Read more: transport setup

In addition, setup also MAILER_SENDER environment variable

MAILER_SENDER=mail_from@example.com

Workers

To process messages asynchronously you must run worker:

bin/console messenger:consume async

Read more: deploying to production

Usage

Navigate your browser to instance address, you will see home page with usage instructions.

Local proxy

On dev env you may want to enable proxy to allow to create subdomains and tests composer organizations:

composer proxy-setup

This will create repman.wip domain. Then you can add other domains with:

symfony proxy:domain:attach your-organization.repman

CLI commands

  • bin/console repman:metadata:clear-cache - clear packages metadata cache (json files)

API Integration

Callbacks:

  • /auth/{provider}/check
  • /register/{provider}/check
  • /user/token/{provider}/check

GitHub

Scopes:

  • registration: user:email
  • repositories: read:org, repo

GitLab

Scopes:

  • registration: read_user
  • repositories: api

Bitbucket

Scopes:

  • registration: email
  • repositories: repository, webhook

Self-hosted GitLab

To integrate with self-hosted GitLab, enter the instance url in the APP_GITLAB_API_URL environment variable

APP_GITLAB_API_URL='https://gitlab.organization.lan'

Docker

  • Override with docker-compose.override.yml if needed.
  • Set your domain (APP_HOST) in .env.docker.

If you wish to use your own certificate put key and certificate in:

  • docker/nginx/ssl/private/server.key
  • docker/nginx/ssl/certs/server.crt

Otherwise self-sign certificate will be generated.

To start all containers run:

docker-compose up

made with ❤️ by Buddy

Packages

 
 
 

Languages

  • PHP 84.4%
  • HTML 15.2%
  • Other 0.4%