Docker image to launch a toran proxy application self hosted to manage PHP dependencies
:warning: | Toran proxy stating no longer supported and that people should use Private Packagist at https://packagist.com instead |
---|
Toran acts as a proxy for Packagist and GitHub. It is meant to be set up on your own server or even inside your office. This offers a few benefits:
docker run --name toran-proxy -d \
-p 80:80 \
cedvan/toran-proxy:1.5.4-2
Go with your browser to localhost
Files are saved to /data/toran-proxy
in container. Just mount this volume for save your configurations and repositories
docker run --name toran-proxy -d \
-v /opt/toran-proxy:/data/toran-proxy \
cedvan/toran-proxy:1.5.4-2
docker run --name toran-proxy -d \
-p 443:443 \
-v /opt/toran-proxy/ssh:/data/toran-proxy/ssh \
cedvan/toran-proxy:1.5.4-2
Files supported : id_rsa
, id_rsa.pub
, config
and known_hosts
docker run --name toran-proxy -d \
-p 443:443 \
-e "TORAN_CRON_TIMER=half" \
cedvan/toran-proxy:1.5.4-2
docker run --name toran-proxy -d \
-p 443:443 \
-e "TORAN_HTTPS=true" \
-v /opt/toran-proxy/certs:/data/toran-proxy/certs \
cedvan/toran-proxy:1.5.4-2
Add your toran-proxy.key and toran-proxy.crt in folder certs. If toran-proxy.key
and toran-proxy.crt
do not exist, the container will create self-signed certificates
Use file htpasswd to add authentification ?
Add auth.json
to composer configuration home folder
{
"http-basic": {
"toran-proxy.domain.tld": {
"username": "myUsername",
"password": "myPassword"
},
}
}
Please refer the docker run command options for the --env-file
flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command. Alternately you can use fig.
Below is the complete list of available options that can be used to customize your toran proxy installation.
localhost
80
true
to enable https support, Defaults to false
. If you do not use a reverse proxy, do not forget to add the certificates files
443
true
if you use docker behind a reverse proxy for i.e. ssl termination. This will make Toran use the HTTPS scheme without the need to add certificates. If you do so, make sure to set your reverse proxy to target port 443. Defaults to false
fifteen
minutes
: All minutesfive
: All five minutesfifteen
: All fifteen minuteshalf
: All thirty minuteshour
: All hoursdaily
: All days at 04:00 (Use TORAN_CRON_TIMER_DAILY_TIME for customize time)HH:MM
format. Defaults to 04:00
null
.true
to get an install log in /data/toran-proxy/logs/downloads.private.log
. Defaults to false
true
for switch to a monorepo instead of dual repo model. Defaults to false
Europe/Paris
.true
to enable HTTP Basic Authentication. When enabled, TORAN_AUTH_USER
and TORAN_AUTH_PASSWORD
are required. Defaults to false
.toran
.toran
.For scenarios where the degree of configurability his image offers via the above listed options is not sufficient, you are able to add container local customization scripts which will get executed during container runtime. Here you can add for example sed calls which further tweak the nginx configuration.
The container launch.sh
script expects custom scripts to be found under
/data/toran-proxy/scripts/*.sh
. These scripts just get sourced in order.
export custdir=/tmp/toran-customs
mkdir -p $custdir
echo "echo 'hello world'" > $custdir/hello.sh
docker run --name toran-proxy -d \
-p 443:443 \
-v $custdir:/data/toran-proxy/scripts
cedvan/toran-proxy:1.5.4-2
By default, Toran proxy license is for personal use. You can add a license from the Toran proxy interface
See CONTRIBUTING file.
Toran is built by Jordi Boggiano, lead developer of Composer. As such he can make sure they work well together. No surprises.