πŸ‹πŸ“¦βœ‚οΈπŸ“‹πŸ“¦ Docker image of packagist mirror

Overview

Build Status Docker pulls Minimum PHP Version FOSSA Status Software License Mentioned in Awesome composer

Docker for Packagist Mirror

This project allows you to easily create and update a mirror of the packagist having as dependency only the docker. It is possible to completely customize the mirror only by using environment variable and thereby create an institutional mirror or for a particular country without any problem.

We use webysther/composer-debian as alternative to official composer on docker hub because the alpine version has issues with I/O.

Usage

Schedule in case of restart or another problem, the first execution create a mirror:

* * * * * root docker run --name mirror --rm -v /var/www/html:/public -e MAINTAINER_REPO='mymirror.com' webysther/packagist-mirror

Synchronized continuously:

*    *  * * * root docker run --name mirror --rm --device-read-bps /dev/xvda:600kb --device-write-bps /dev/xvda:600kb -e SLEEP=0 -v /var/www/html:/public webysther/packagist-mirror

Sample used inside packagist.com.br (update docker composer every day):

# Every minute
*    *  * * * root docker run --name mirror --rm --device-read-bps /dev/xvda:600kb --device-write-bps /dev/xvda:600kb -e SLEEP=0 -v /var/www/html:/public webysther/packagist-mirror

# Every 1:00 AM
0    1  * * * root docker pull webysther/packagist-mirror 

# Every 2:30 AM
30   2  * * * root service docker restart

You can add more mirrors with additional URL's separated by comma:

-e DATA_MIRROR='https://packagist.jp,https://packagist.com.br'

Main mirror is used to get providers and fallback in case of error on data mirror, you can also change them:

-e MAIN_MIRROR='https://packagist.com.br'

You also can change parallel connections for every mirror:

-e MAX_CONNECTIONS=10

All enviroment options stay on .env file.

License

FOSSA Status

You might also like...
πŸ‹ This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

πŸ‹ This project aims to broaden knowledge of system administration by using Docker: virtualizing several Docker images, creating them in a new personal virtual machine.

CloudFlare Image Resizing plugin for WordPress.

Cloudflare Image Resizing plugin for WordPress The current Cloudflare plugin for WordPress does not replace URL's automatically for you to use the Ima

Smd thumbnail - Multiple image thumbnails of arbitrary dimensions

smd_thumbnail Download | Packagist If you’re bored of one Textpattern thumbnail per image and don’t fancy using an auto-resizing script or relying on

Tom image grid - Plugin for Textpattern CMS : An optionnal grid display for images tab

tom_image_grid tom_image_grid is a plugin for Textpattern CMS. It allows a more compact display (as a grid) of the images list. The plugin adds two bu

Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates
Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates

Magento 2 Image Resizer Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates Installation $ composer require

Detect the position of a face in an image.

Face Detector PHP GD λ₯Ό μ΄μš©ν•΄ μ΄λ―Έμ§€μ˜ μ–Όκ΅΄ μœ„μΉ˜λ₯Ό μ‹λ³„ν•©λ‹ˆλ‹€. mauricesvay/php-facedetection ν”„λ‘œμ νŠΈλ₯Ό 기반으둜 λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€. js 둜 ν¬νŒ…ν•˜λ©° κ°œμ„ ν•œ 사항듀을 μ μš©ν•˜μ—¬ error_reporting = E_ALL safe ν•˜κ²Œ

Simple, image-based, mathematical captcha, with increasing levels of difficulty
Simple, image-based, mathematical captcha, with increasing levels of difficulty

simple-captcha Simple, image-based, mathematical captcha, with increasing levels of difficulty version 1.1.0 see also: ModelView a simple, fast, power

This is a collection of tutorials for learning how to use Docker with various tools. Contributions welcome.

Docker Tutorials and Labs At this time we are not actively adding labs to this repository. Our focus is on training.play-with-docker.com where new lab

Full PHP development environment for Docker.
Full PHP development environment for Docker.

Full PHP development environment based on Docker. Use Docker First - Learn About It Later! Join Us Awesome People Laradock is an MIT-licensed open sou

Comments
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 1
  • "http://packagist.test/packages.json" does not contain valid JSON

    I have tried running local mirror of composer with the docker image using below command

    $ docker run --name mirror --rm -v /Users/tumaini/workspace/composer-cache:/public -e MAINTAINER_REPO='packagist.test' webysther/packagist-mirror
    

    After container finishes executing following is file structure of the cache folder

    Screenshot 2019-06-29 at 13 10 57

    I have pointed the cache folder to local virtualhost http://packagist.test, and configured composer to point to local repo

    composer config -g repos.packagist composer http://packagist.test 
    

    However, when I run composer update I get error

    "http://packagist.test/packages.json" does not contain valid JSON 
    

    Seems the packages.json file is a shortcut to zipped file and webserver unable render this as json.

    opened by tumainimosha 1
Docker-magento - Docker image for Magento 1.6 to 1.9

Docker image for Magento 1.x This repo creates a Docker image for Magento 1.x. Please note The primary goal of this repo is to create Docker images fo

Fu Cheng 144 Nov 18, 2022
Mirror Laravel model inside Firestore collection.

Laravel Firestore Mirror This package can be used to store copy of Laravel model inside Firestore collection. Installation Install package: composer r

Firevel 5 Feb 27, 2022
PSpec is a testing framework for PHP, influenced by RSpec and jest. πŸ§ͺ This repo is a MIRROR of the GitLab source repository.

PSpec PSpec is a testing framework for PHP, influenced by RSpec and jest. This project is experimental and still needs a lot of work. Example // src/C

CodingPaws 0 Mar 31, 2022
WordPress plugin renames image filenames to be more SEO friendly, based on the post's data and image metadata.

=== Automatic image Rename === Contributors: wpsunshine Tags: image, images, SEO, rename, optimization Requires at least: 5.0 Tested up to: 6.2.2 Stab

null 8 Jun 11, 2023
Docker image that provides static analysis tools for PHP

Static Analysis Tools for PHP Docker image providing static analysis tools for PHP. The list of available tools and the installer are actually managed

Jakub Zalas 1.1k Jan 1, 2023
Repman - PHP Repository Manager: packagist proxy and host for private packages

Repman - PHP Repository Manager Repman is a PHP repository manager. Main features: free and open source works as a proxy for packagist.org (speeds up

Repman 438 Jan 2, 2023
WordPress Packagist β€” manage your plugins with Composer

WordPress Packagist This is the repository for wpackagist.org which allows WordPress plugins and themes to be managed along with other dependencies us

Outlandish 648 Jan 1, 2023
Magento 2 Email Catcher or Email Logger Module. Available At Packagist.

Magento 2 Module Experius email catcher / - logger ``experius/module-emailcatcher`` Main Functionalities Installation Versions Enable email catcher C

Experius 53 Dec 18, 2022
A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

?? Docker + PHP 7.4 + MySQL8.0 + Nginx + Certbot(HTTPS) + Symfony 5 Boilerplate ?? Edited from https://github.com/ger86/symfony-docker version -> http

null 6 Nov 9, 2022
Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

Meanbee 454 Dec 27, 2022