Sign inSign up

rrvenn/phorge

By rrvenn

Updated 7 months ago

Image
0

6.9K

rrvenn/phorge repository overview

rrvenn/phorge (unofficial)

Unofficial Docker image for Phorge. This image runs Phorge in a single container (PHP-FPM + Nginx + SSH hooks + supervisord) and is built from the Dockerfile in this repository.

Important: This image is unofficial and not affiliated with the upstream Phorge project.


Image

  • Name: rrvenn/phorge
  • Tags: latest, and CI-published short commit SHA tags (7 characters) for reproducible builds.

Automated builds The repository contains a GitHub Actions workflow (.github/workflows/dockerimage.yml) that builds the image on a schedule and on demand. Built images are pushed to Docker Hub.


Quick start

Run the latest published image directly:

docker run --rm -p 80:80 -p 8022:8022 \
  -e MYSQL_HOST=mysqlhost.example -e MYSQL_USER=root -e MYSQL_PASSWORD=changeme \
  -e BASE_URI=example.com -v /path/to/repos:/var/repo \
  rrvenn/phorge:latest

Start the full stack with the included docker-compose.yml (recommended for local testing):

  1. Create a .env file next to docker-compose.yml (see template below).
  2. Run:
docker-compose up -d

Environment variables (.env)

The container reads environment variables at start and startup.sh applies them to Phorge's configuration.

Recommended .env template (place next to docker-compose.yml):

# Phorge runtime
PROTOCOL=http
BASE_URI=example.com

# SSH / git user
GIT_USER=root
SSH_PORT=8022

# Database (MariaDB/MySQL)
MYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=changeme

# MinIO / S3 (optional)
MINIO_SERVER=minio
MINIO_PORT=9000
MINIO_SERVER_ACCESS_KEY=access_key
MINIO_SERVER_SECRET_KEY=secret_key

# SMTP (optional - all required for SMTP to be configured)
SMTP_SERVER=smtp.example.com
SMTP_PORT=587
SMTP_USER=smtp-user
SMTP_PASSWORD=smtp-password
SMTP_PROTOCOL=tls

Notes:

  • BASE_URI should be the public domain (no trailing slash). The startup script writes this into Phorge configuration and updates the nginx config.
  • Setting PROTOCOL=https causes a small PHP preamble to mark requests as HTTPS.
  • GIT_USER is created (if missing) and configured as the SSH/git user inside the container.
  • If MINIO_SERVER and credentials are provided, the startup script configures Phorge to use S3-compatible storage (MinIO).
  • SMTP configuration requires all SMTP keys (SMTP_SERVER, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_PROTOCOL) to be set to enable email sending.

docker-compose configuration

The included docker-compose.yml defines three services:

  • ph-web — service using rrvenn/phorge image, exposes ports 80 and 8022 in the compose file.
  • ph-databasemariadb:10.5.1 (database data persisted in a named volume).
  • ph-storageminio/minio used for S3-compatible object storage.

docker-compose.yml uses env_file: .env so environment variables defined in your .env file are injected into the containers.


Persistence and volumes

docker-compose.yml declares named volumes for the database, storage and repository (database-volume, storage-server, ph-repo). You can replace these with host-mounted paths if you prefer.


Reproducible tags and CI

Automated CI publishes both a latest tag and a short SHA tag for each build. If you need a specific build, pull rrvenn/phorge:<short-sha>; otherwise rrvenn/phorge:latest will track the most recent image published by CI.


Where to find more information

  • Dockerfile: see Dockerfile in this repository for the exact base image and defaults.
  • Startup script: see scripts/startup.sh for how environment variables are applied to Phorge.
  • Workflow: .github/workflows/dockerimage.yml contains the build/publish logic for CI.

License & disclaimer

This is an unofficial, community-provided image. Use at your own risk. See the repository LICENSE for licensing information.

Tag summary

Content type

Image

Digest

sha256:36f020b6b

Size

392.5 MB

Last updated

7 months ago

docker pull rrvenn/phorge