All Projects → nicklog → devliver

nicklog / devliver

Licence: GPL-3.0 license
Your private self hosted composer repository with user management

Programming Languages

PHP
23972 projects - #3 most used programming language
Twig
543 projects
javascript
184084 projects - #8 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects
shell
77523 projects
SCSS
7915 projects

Projects that are alternatives of or similar to devliver

zusam
Private groups to share messages, photos, videos, links with friends and family.
Stars: ✭ 79 (+58%)
Mutual labels:  selfhosted, self-hosted, private
Laravel Messenger
Simple user messaging package for Laravel
Stars: ✭ 2,140 (+4180%)
Mutual labels:  package, composer
Patchman
Patchman is a Linux Patch Status Monitoring System
Stars: ✭ 163 (+226%)
Mutual labels:  package, repository
Temps
λ A selfhostable serverless function runtime. Inspired by zeit now.
Stars: ✭ 15 (-70%)
Mutual labels:  repository, selfhosted
Pharbuilder
Create Phar of Composer based PHP application
Stars: ✭ 122 (+144%)
Mutual labels:  package, composer
Xmake Repo
📦 An official xmake package repository
Stars: ✭ 130 (+160%)
Mutual labels:  package, repository
uptime-kuma
A fancy self-hosted monitoring tool
Stars: ✭ 27,425 (+54750%)
Mutual labels:  selfhosted, self-hosted
Repology Updater
Repology backend service to update repository and package data
Stars: ✭ 348 (+596%)
Mutual labels:  package, repository
gatus
⛑ Automated service health dashboard
Stars: ✭ 3,018 (+5936%)
Mutual labels:  selfhosted, self-hosted
laration
Simple package to see all current configurations being used by your Laravel application
Stars: ✭ 47 (-6%)
Mutual labels:  package, composer
Htmlcache
Laravel middleware to cache the rendered html
Stars: ✭ 35 (-30%)
Mutual labels:  package, composer
alternative-frontends
🔐🌐 Privacy-respecting web frontends for popular services
Stars: ✭ 821 (+1542%)
Mutual labels:  selfhosted, self-hosted
Package Skeleton
📦 My base for PHP packages.
Stars: ✭ 6 (-88%)
Mutual labels:  package, composer
Laravel Paket
Composer GUI. Manage Laravel dependencies from web interface without switching to command line!
Stars: ✭ 143 (+186%)
Mutual labels:  package, composer
Sleepingowladmin
🦉 Administrative interface builder for Laravel (Laravel admin)
Stars: ✭ 671 (+1242%)
Mutual labels:  package, composer
Nebula
Nebula is a minimalistic and easy to use administration tool for Laravel applications, made with Laravel, Alpine.js, and Tailwind CSS.
Stars: ✭ 190 (+280%)
Mutual labels:  package, composer
aplus
Aplus Command Line Tool
Stars: ✭ 71 (+42%)
Mutual labels:  package, composer
Universe
The Mesosphere Universe package repository.
Stars: ✭ 308 (+516%)
Mutual labels:  package, repository
wake-pc
Wake PC is a tiny self-hosted Wake-On-Lan (WOL) app written in PHP for linux machines that you can use to wake up machines on your local network.
Stars: ✭ 44 (-12%)
Mutual labels:  selfhosted, self-hosted
package-command
Lists, installs, and removes WP-CLI packages.
Stars: ✭ 16 (-68%)
Mutual labels:  package, composer

Devliver

Your private self-hosted composer repository.

Buy me a coffee

Docker Build License

Requirements

  • Docker
  • MariaDB/MySQL
  • the running docker container has access to private git repositories with ssh.

Installation

Create a docker-compose.yml file in an empty directory.

version: '3.6'

services:
  devliver:
    image: nicklog/devliver:latest
    volumes:
      - ./data:/var/www/html/data
      - ${HOME}/.ssh:/home/docker/.ssh
      - ${HOME}/.composer/:/home/docker/.composer/
    environment:
      - TZ=Europe/Berlin
      - APP_API_KEY=A-TOP-SECRET-KEY
      - DATABASE_NAME=devliver
      - DATABASE_USER=devliver
      - DATABASE_PASSWORD=devliver
      - DATABASE_HOST=database
      - DATABASE_PORT=3306
    depends_on:
      - database
    networks:
      - default
    ports:
      - "9000:80"

  database:
    image: mariadb:latest
    environment:
      - MYSQL_DATABASE=devliver
      - MYSQL_USER=devliver
      - MYSQL_PASSWORD=devliver
      - MYSQL_ROOT_PASSWORD=devliver
    networks:
      - default

Change any settings to your needs and then run simply docker-compose up -d.
You should now be able to access the site under port 9000 or the port you set.

With this example setup the website is not secured by https.
When you want to secure it I suggest to use a reverse proxy.

User

On first call of the website you can create a user. Create one and then login.
The first user becomes an admin and can create more user if necessary.

Clients

The packages.json, available under https://devliver-domain.url/packages.json, is secured by basic http authentication.
Add clients. These clients have access to the packages.json and can download archives.
Each client gets a token automatically.

Repository Authentication

The git repositories will usually be protected. You have to store an SSH key in the ssh directory in the home directory for the corresponding web server or in the directory of the docker-compose directory.
No matter, it must be ensured in any case that the SSH keys are available in the Docker container like in the example.

How to use in composer.json

To use your Devliver installation in Composer, there is a package repository you have to add to the composer.json in your projects.
This is your repository of private packages. Composer will ask you for credentials.
Use a client name as username and the token as password. If you want store these credentials in auth.json. Otherwise Composer will aks you always again.

{
  "repositories": [
    {
      "type": "composer",
      "url": "https://devliver-domain.url",
    }
  ]
}

Webhooks

Creating a Webhook ensures that your package will always be updated instantly when you push to your repository.

GitHub

  • Go to your GitHub repository
  • Click the Settings button
  • Click Webhooks and click on Add webhook
  • Enter https://devliver-domain.url/api/update-package?token=APP_API_TOKEN in Payload URL
  • Select application/json in Content type and let Secret empty
  • Which events would you like to trigger this webhook? - Just the push event.
  • Finally click on the green button Add webhook

GitLab

  • Go to your Admin Area
  • Click the "System Hooks" button in den left panel
  • Enter https://devliver-domain.url/api/update-package?token=APP_API_TOKEN in url field
  • Let "Secret Token" empty
  • Enable "Push events" and "Tag push events"
  • Submit the form

Bitbucket

  • Go to your BitBucket repository
  • Open the settings and select "Webhooks" in the menu
  • Add a new hook.
  • Enter https://devliver-domain.url/api/update-package?token=APP_API_TOKEN as URL
  • Save your changes and you're done.

Manual

If you do not use Bitbucket or GitHub there is a generic endpoint you can call manually from a git post-receive hook or similar. You have to do a POST request to https://devliver-domain.url/api/update-package?token=APP_API_TOKEN with a request body looking like this:

{
  "repository": {
    "git_url": "REPOSITORY_GIT_URL"
  }
}

For example with curl

curl -XPOST -H'content-type:application/json' 'https://devliver-domain.url/api/update-package?token=APP_API_TOKEN' -d'{"repository":{"git_url":"REPOSITORY_GIT_URL"}}'

Update

Just update the docker image with...

docker-compose pull
docker-compose up -d
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].