{"id":13550391,"url":"https://github.com/crazy-max/docker-flarum","last_synced_at":"2025-04-09T12:05:20.645Z","repository":{"id":38383717,"uuid":"224264785","full_name":"crazy-max/docker-flarum","owner":"crazy-max","description":"Flarum Docker image","archived":false,"fork":false,"pushed_at":"2024-06-23T11:08:13.000Z","size":248,"stargazers_count":192,"open_issues_count":10,"forks_count":33,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-30T08:14:44.284Z","etag":null,"topics":["alpine-linux","docker","docker-compose","flarum","nginx","traefik"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crazy-max.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"crazy-max","custom":"https://www.paypal.me/crazyws"}},"created_at":"2019-11-26T18:58:05.000Z","updated_at":"2024-10-24T04:36:22.000Z","dependencies_parsed_at":"2023-12-30T23:23:14.730Z","dependency_job_id":"3103949b-be1e-4c1d-aa48-8b997a58d01c","html_url":"https://github.com/crazy-max/docker-flarum","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-flarum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-flarum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-flarum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazy-max%2Fdocker-flarum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazy-max","download_url":"https://codeload.github.com/crazy-max/docker-flarum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036063,"owners_count":21037092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine-linux","docker","docker-compose","flarum","nginx","traefik"],"created_at":"2024-08-01T12:01:32.507Z","updated_at":"2025-04-09T12:05:20.623Z","avatar_url":"https://github.com/crazy-max.png","language":"Dockerfile","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/crazy-max/docker-flarum\" target=\"_blank\"\u003e\u003cimg height=\"128\" src=\"https://raw.githubusercontent.com/crazy-max/docker-flarum/master/.github/docker-flarum.jpg\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/flarum/tags?page=1\u0026ordering=last_updated\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/crazy-max/docker-flarum?label=version\u0026style=flat-square\" alt=\"Latest Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/crazy-max/docker-flarum/actions?workflow=build\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/crazy-max/docker-flarum/build.yml?branch=master\u0026label=build\u0026logo=github\u0026style=flat-square\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/flarum/\"\u003e\u003cimg src=\"https://img.shields.io/docker/stars/crazymax/flarum.svg?style=flat-square\u0026logo=docker\" alt=\"Docker Stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/crazymax/flarum/\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/crazymax/flarum.svg?style=flat-square\u0026logo=docker\" alt=\"Docker Pulls\"\u003e\u003c/a\u003e\n  \u003cbr /\u003e\u003ca href=\"https://github.com/sponsors/crazy-max\"\u003e\u003cimg src=\"https://img.shields.io/badge/sponsor-crazy--max-181717.svg?logo=github\u0026style=flat-square\" alt=\"Become a sponsor\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.paypal.me/crazyws\"\u003e\u003cimg src=\"https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal\u0026style=flat-square\" alt=\"Donate Paypal\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\nDocker image for [Flarum](https://flarum.org/), the next-generation forum\nsoftware that makes online discussion fun.\n\n\u003e [!TIP] \n\u003e Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun)\n\u003e project!\n\n___\n\n* [Features](#features)\n* [Build locally](#build-locally)\n* [Image](#image)\n* [Environment variables](#environment-variables)\n  * [General](#general)\n  * [Flarum](#flarum)\n  * [Database](#database)\n* [Volumes](#volumes)\n* [Ports](#ports)\n* [Usage](#usage)\n  * [Docker Compose](#docker-compose)\n  * [Command line](#command-line)\n* [Upgrade](#upgrade)\n* [Notes](#notes)\n  * [First launch](#first-launch)\n  * [Manage extensions](#manage-extensions)\n  * [Sending mails with SMTP](#sending-mails-with-smtp)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Features\n\n* Run as non-root user\n* Multi-platform image\n* [s6-overlay](https://github.com/just-containers/s6-overlay/) as process supervisor\n* [msmtpd SMTP relay](https://github.com/crazy-max/docker-msmtpd) image to send emails\n* [Traefik](https://github.com/containous/traefik-library-image) as reverse proxy and creation/renewal of Let's Encrypt certificates (see [this template](examples/traefik))\n\n## Build locally\n\n```shell\ngit clone https://github.com/crazy-max/docker-flarum.git\ncd docker-flarum\n\n# Build image and output to docker (default)\ndocker buildx bake\n\n# Build multi-platform image\ndocker buildx bake image-all\n```\n\n## Image\n\n| Registry                                                                                          | Image                      |\n|---------------------------------------------------------------------------------------------------|----------------------------|\n| [Docker Hub](https://hub.docker.com/r/crazymax/flarum/)                                           | `crazymax/flarum`          |\n| [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/flarum) | `ghcr.io/crazy-max/flarum` |\n\nFollowing platforms for this image are available:\n\n```\n$ docker buildx imagetools inspect crazymax/flarum --format \"{{json .Manifest}}\" | \\\n  jq -r '.manifests[] | select(.platform.os != null and .platform.os != \"unknown\") | .platform | \"\\(.os)/\\(.architecture)\\(if .variant then \"/\" + .variant else \"\" end)\"'\n\nlinux/amd64\nlinux/arm/v6\nlinux/arm/v7\nlinux/arm64\n```\n\n## Environment variables\n\n### General\n\n* `TZ`: The timezone assigned to the container (default `UTC`)\n* `PUID`: Flarum user id (default `1000`)\n* `PGID`: Flarum group id (default `1000`)\n* `MEMORY_LIMIT`: PHP memory limit (default `256M`)\n* `UPLOAD_MAX_SIZE`: Upload max size (default `16M`)\n* `CLEAR_ENV`: Clear environment in FPM workers (default `yes`)\n* `OPCACHE_MEM_SIZE`: PHP OpCache memory consumption (default `128`)\n* `LISTEN_IPV6`: Enable IPv6 for Nginx (default `true`)\n* `REAL_IP_FROM`: Trusted addresses that are known to send correct replacement addresses (default `0.0.0.0/32`)\n* `REAL_IP_HEADER`: Request header field whose value will be used to replace the client address (default `X-Forwarded-For`)\n* `LOG_IP_VAR`: Use another variable to retrieve the remote IP address for access [log_format](http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format) on Nginx. (default `remote_addr`)\n\n### Flarum\n\n* `FLARUM_DEBUG`: Enables or disables debug mode, used to troubleshoot issues (default `false`)\n* `FLARUM_BASE_URL`: The URL to your Flarum installation **required**\n* `FLARUM_FORUM_TITLE`: Flarum forum title, only used during first installation (default `Flarum Dockerized`)\n* `FLARUM_API_PATH`: Flarum api path (default `api`)\n* `FLARUM_ADMIN_PATH`: Flarum admin path (default `admin`)\n* `FLARUM_POWEREDBY_HEADER`: Set Flarum's `X-Powered-By` header (default `true`)\n* `FLARUM_REFERRER_POLICY`: Referrer policy (default `same-origin`)\n* `FLARUM_COOKIE_SAMESITE`: Set `SameSite` attribute of `Set-Cookie` (default `lax`)\n\n### Database\n\n* `DB_HOST`: MySQL database hostname / IP address **required**\n* `DB_PORT`: MySQL database port (default `3306`)\n* `DB_NAME`: MySQL database name (default `flarum`)\n* `DB_USER`: MySQL user (default `flarum`)\n* `DB_PASSWORD`: MySQL password\n* `DB_PREFIX`: MySQL database prefix (default `flarum_`)\n* `DB_NOPREFIX`: Enforce no prefix for the MySQL database (default `false`)\n* `DB_TIMEOUT`: Time in seconds after which we stop trying to reach the MySQL server (useful for clusters, default `60`)\n\n\u003e [!NOTE]\n\u003e `DB_USER_FILE` and `DB_PASSWORD_FILE` can be used to fill in the value from a\n\u003e file, especially for Docker's secrets feature.\n\n## Volumes\n\n* `/data`: Contains assets, extensions and storage\n\n\u003e [!WARNING]\n\u003e Note that the volume should be owned by the user/group with the specified\n\u003e `PUID` and `PGID`. If you don't give the volume correct permissions, the\n\u003e container may not start.\n\n## Ports\n\n* `8000`: HTTP port\n\n## Usage\n\n### Docker Compose\n\nDocker compose is the recommended way to run this image. You can use the following\n[docker compose template](examples/compose/compose.yml), then run the container:\n\n```bash\ndocker compose up -d\ndocker compose logs -f\n```\n\n### Command line\n\nYou can also use the following minimal command:\n\n```bash\ndocker run -d -p 8000:8000 --name flarum \\\n  -v $(pwd)/data:/data \\\n  -e \"DB_HOST=db\" \\\n  -e \"FLARUM_BASE_URL=http://127.0.0.1:8000\" \\\n  crazymax/flarum:latest\n```\n\n\u003e [!WARNING]\n\u003e `db` must be a running MySQL instance\n\n## Upgrade\n\nYou can upgrade Flarum automatically through the UI, it works well. But I\nrecommend to recreate the container whenever I push an update:\n\n```bash\ndocker compose pull\ndocker compose up -d\n```\n\n## Notes\n\n### First launch\n\nOn first launch, an initial administrator user will be created:\n\n| Login    | Password |\n|----------|----------|\n| `flarum` | `flarum` |\n\n### Manage extensions\n\nYou can install [Flarum extensions](https://extiverse.com/) from the command line using a\n[specially crafted script](rootfs/usr/local/bin/extension) with this image:\n\n`docker compose exec flarum extension require \u003cpackage\u003e [\u003cpackage\u003e ...]`\n\nTo remove one or more extensions:\n\n`docker compose exec flarum extension remove \u003cpackage\u003e [\u003cpackage\u003e ...]`\n\nTo list all extensions:\n\n`docker compose exec flarum extension list`\n\nExample with [`fof/upload`](https://extiverse.com/extension/fof/upload) extension:\n\n```\n$ docker compose exec flarum extension require fof/upload\nUsing version ^1.0 for fof/upload\n./composer.json has been updated\nRunning composer update fof/upload\nLoading composer repositories with package information\nUpdating dependencies\nLock file operations: 5 installs, 0 updates, 0 removals\n  - Locking fof/upload (1.0.0)\n  - Locking guzzlehttp/guzzle (7.3.0)\n  - Locking guzzlehttp/promises (1.4.1)\n  - Locking psr/http-client (1.0.1)\n  - Locking softcreatr/php-mime-detector (3.2.0)\nWriting lock file\nInstalling dependencies from lock file (including require-dev)\nPackage operations: 5 installs, 0 updates, 0 removals\n  - Downloading softcreatr/php-mime-detector (3.2.0)\n  - Downloading psr/http-client (1.0.1)\n  - Downloading guzzlehttp/promises (1.4.1)\n  - Downloading guzzlehttp/guzzle (7.3.0)\n  - Downloading fof/upload (1.0.0)\n  - Installing softcreatr/php-mime-detector (3.2.0): Extracting archive\n  - Installing psr/http-client (1.0.1): Extracting archive\n  - Installing guzzlehttp/promises (1.4.1): Extracting archive\n  - Installing guzzlehttp/guzzle (7.3.0): Extracting archive\n  - Installing fof/upload (1.0.0): Extracting archive\n2 package suggestions were added by new dependencies, use `composer suggest` to see details.\nGenerating autoload files\n70 packages you are using are looking for funding.\nUse the `composer fund` command to find out more!\nfof/upload extension added\nClearing the cache...\n```\n\n\u003e [!WARNING]\n\u003e You cannot use [Bazaar marketplace extension](https://discuss.flarum.org/d/5151-bazaar-the-extension-marketplace)\n\u003e to install extensions for now.\n\n### Sending mails with SMTP\n\nYou can use our SMTP relay `msmtpd` service published on port `2500` and\ndeclared in our [`compose.yml`](examples/compose/compose.yml):\n\n![](.github/smtp-settings.png)\n\n## Contributing\n\nWant to contribute? Awesome! The most basic way to show your support is to star\nthe project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max)\nor by making a [PayPal donation](https://www.paypal.me/crazyws) to ensure this\njourney continues indefinitely!\n\nThanks again for your support, it is much appreciated! :pray:\n\n## License\n\nMIT. See `LICENSE` for more details.\n","funding_links":["https://github.com/sponsors/crazy-max","https://www.paypal.me/crazyws"],"categories":["Dockerfile","docker"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Fdocker-flarum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazy-max%2Fdocker-flarum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazy-max%2Fdocker-flarum/lists"}