Unofficial Docker image for Phorge — an open source, community-maintained fork of Phabricator. This image bundles PHP-FPM, Nginx, Phorge, and Arcanist into a single container, ready to run alongside a MySQL container.
mysqli, pdo_mysql, mbstring, gd, opcache, etc.)mkdir phorge && cd phorge
mkdir -p mysql-init
.env file# App
APP_PORT=8080
BASE_URI=http://your-domain-or-ip:8080
# MySQL
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=your_secure_password
MYSQL_DATABASE=phorge
BASE_URImust contain a dot (e.g.http://127.0.0.1:8080orhttps://phorge.example.com). Bare hostnames likehttp://localhostare not supported.
mysql-init/init.sqlCREATE DATABASE IF NOT EXISTS phorge CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'your_secure_password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Replace
your_secure_passwordwith the same value asMYSQL_PASSWORDin your.envfile.
docker-compose.ymlservices:
phorge:
image: doantaa/phorge:latest
container_name: phorge-app
ports:
- "${APP_PORT:-8080}:80"
volumes:
- phorge-config:/opt/phorge/conf/local
- phorge-files:/opt/phorge/files
environment:
- MYSQL_HOST=phorge-db
- MYSQL_PORT=${MYSQL_PORT:-3306}
- MYSQL_USER=${MYSQL_USER:-root}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- BASE_URI=${BASE_URI:-http://127.0.0.1:8080}
depends_on:
- mysql
restart: unless-stopped
mysql:
image: mysql:8.0
container_name: phorge-db
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE:-phorge}
- MYSQL_ROOT_HOST=%
volumes:
- mysql_data:/var/lib/mysql
- ./mysql-init:/docker-entrypoint-initdb.d
ports:
- "${MYSQL_PORT:-3306}:3306"
restart: unless-stopped
volumes:
mysql_data:
phorge-config:
phorge-files:
docker compose up -d
docker compose logs -f phorge-app
Once you see Starting Nginx... in the logs, open your browser at the value of your BASE_URI.
| Variable | Default | Description |
|---|---|---|
APP_PORT | 8080 | Port to access Phorge on host |
BASE_URI | http://127.0.0.1:8080 | Base URI for Phorge (must contain a dot) |
MYSQL_HOST | phorge-db | MySQL container hostname |
MYSQL_PORT | 3306 | MySQL port |
MYSQL_USER | root | MySQL username |
MYSQL_PASSWORD | (required) | MySQL password |
MYSQL_DATABASE | phorge | MySQL database name |
After the container starts, open Phorge in your browser. You will be prompted to create an admin account. Follow the on-screen instructions to complete the setup.
Storage upgrade runs automatically every time the container starts. To pull the latest image:
docker compose pull
docker compose up -d
docker image prune -f
To configure email sending, go to Config → search for cluster.mailers in the Phorge web UI, or run inside the container:
docker compose exec phorge-app bash
cd /opt/phorge
./bin/config set cluster.mailers '[
{
"key": "gmail-smtp",
"type": "smtp",
"options": {
"host": "smtp.gmail.com",
"port": 587,
"user": "[email protected]",
"password": "your-app-password",
"protocol": "tls"
}
}
]'
For Gmail, use an App Password, not your regular Gmail password. Make sure 2-Step Verification is enabled on your Google account.
# View logs
docker compose logs -f phorge-app
# Enter container shell
docker compose exec phorge-app bash
# Check daemon status
docker compose exec phorge-app /opt/phorge/bin/phd status
# Restart daemon
docker compose exec phorge-app /opt/phorge/bin/phd restart
# Run storage upgrade manually
docker compose exec phorge-app /opt/phorge/bin/storage upgrade --force
# Test send email
docker compose exec phorge-app /opt/phorge/bin/mail send-test --to [email protected] --subject "Test"
| Data | Stored In | Description |
|---|---|---|
| Phorge config | phorge-config volume | local.json and other config files |
| Uploaded files | phorge-files volume | Files uploaded by users |
| MySQL database | mysql_data volume | All database data |
All data persists across container restarts and upgrades.
Content type
Image
Digest
sha256:ac32d7721…
Size
243.1 MB
Last updated
5 months ago
docker pull doantaa/phorge