Docker For Phorge
- latest
- 1.1.0
- 1.0.0
Tag labels are based on the container image version and are entirely arbitrary
- PHP 7.4-fpm-alpine - Phorge
- Caddy or NGINX - web server
- MariaDB - database
Use Docker Compose or Docker Swarm to deploy. Containers are available from both Docker Hub and the GitHub Container Registry.
There are examples for using either Caddy or NGINX as the web server and examples for using Caddy, NGINX, or Traefik for HTTPS (the Traefik example also includes using it as a reverse proxy). The NGINX examples are in the nginx folder.
I recommend using Caddy as the web server and either have it handle HTTPS or pair it with Traefik as they both have native ACME support for automatically getting HTTPS certificates from Let's Encrypt or will create self signed certificates for local use.
If you can I also recommend using Docker Swarm over Docker Compose as it supports Docker Secrets and Docker Configs.
If Caddy doesn't work for you or you are chasing performance then checkout the NGINX examples. I haven't done any performance testing but NGINX has a lot of configurability which may let you squeeze out better performance if you have a lot of users, also check the performance section below.
Configuration consists of setting environment variables in the .yml
files. More environment variables for configuring Phorge and PHP can be found in docker-entrypoint.sh
and for Caddy in phorge_caddyfile
.
Setting the DOMAIN
variable changes whether Caddy uses HTTP, HTTPS with a self signed certificate, or HTTPS with a certificate from Let's Encrypt or ZeroSSL. Check the Caddy documentation for more info.
phorge_mailers.json
is a simple template for configuring an email provider if you're using one.
On first start you'll need to add an authentication provider, otherwise you won't be able to login or create new users. If you don't have mail setup you can connect to the Phorge container and use /var/www/html/phorge/bin/auth recover <username>
to get a recovery link.
I personally use this with Traefik as a reverse proxy, I've included an example traefik.yml
but it's not necessary.
You'll need to create the appropriate Docker Secrets and Docker Configs.
Run with docker stack deploy --compose-file docker-swarm.yml phorge
Run with docker-compose up -d
. View using 127.0.0.1:9080
.
By default I set PHP to scale up child processes based on demand, this is great for a low resource and light usage environment but setting this to be dynamic or static will yield better performance. Check the PHP Configuration section in docker-entrypoint.sh
for some tuning options to set and/or research.