{"id":15645248,"url":"https://github.com/wonderfall/docker-mastodon","last_synced_at":"2025-04-03T03:12:30.624Z","repository":{"id":81947918,"uuid":"137073937","full_name":"Wonderfall/docker-mastodon","owner":"Wonderfall","description":"All-in-one unofficial Mastodon Docker image, if you want that.","archived":false,"fork":false,"pushed_at":"2025-03-17T03:33:21.000Z","size":104,"stargazers_count":55,"open_issues_count":3,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T03:17:30.611Z","etag":null,"topics":["docker","mastodon"],"latest_commit_sha":null,"homepage":"https://joinmastodon.org/","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/Wonderfall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-12T13:14:13.000Z","updated_at":"2025-03-17T03:33:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6060620-30cf-48b1-bbd1-80c01c2dd6c7","html_url":"https://github.com/Wonderfall/docker-mastodon","commit_stats":{"total_commits":107,"total_committers":2,"mean_commits":53.5,"dds":0.01869158878504673,"last_synced_commit":"3a8d4463dffee9780174cee00f48e5132ca36090"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonderfall%2Fdocker-mastodon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonderfall%2Fdocker-mastodon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonderfall%2Fdocker-mastodon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wonderfall%2Fdocker-mastodon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wonderfall","download_url":"https://codeload.github.com/Wonderfall/docker-mastodon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927839,"owners_count":20856198,"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":["docker","mastodon"],"created_at":"2024-10-03T12:05:23.430Z","updated_at":"2025-04-03T03:12:30.603Z","avatar_url":"https://github.com/Wonderfall.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wonderfall/mastodon\n*Your self-hosted, globally interconnected microblogging community.*\n\nMastodon [official website](https://joinmastodon.org/) and [source code](https://github.com/tootsuite/mastodon/).\n\n## Why this image?\nThis non-official image is intended as an **all-in-one** (as in monolithic) Mastodon **production** image. You should use [the official image](https://hub.docker.com/r/tootsuite/mastodon) for development purpose or if you want scalability.\n\n## Security\nDon't run random images from random dudes on the Internet. Ideally, you want to maintain and build it yourself.\n\nImages are scanned every day by [Trivy](https://github.com/aquasecurity/trivy) for OS vulnerabilities. They are rebuilt once a week, so you should often update your images regardless of your Mastodon version.\n\n## Features\n- Rootless image\n- Based on Alpine Linux\n- Includes [hardened_malloc](https://github.com/GrapheneOS/hardened_malloc)\n- Precompiled assets for Mastodon\n\n## Tags\n- `latest` : latest Mastodon version (or working commit)\n- `x.x` : latest Mastodon x.x (e.g. `3.4`)\n- `x.x.x` : Mastodon x.x.x (including release candidates)\n\nYou can always have a glance [here](https://github.com/users/Wonderfall/packages/container/package/mastodon).\n\n## Build-time variables\n|          Variable         |         Description        |       Default      |\n| ------------------------- | -------------------------- | ------------------ |\n| **MASTODON_VERSION**      | version/commit of Mastodon |         N/A        |\n| **REPOSITORY**            | source of Mastodon         | tootsuite/mastodon |\n\n## Environment variables you should change\n\n|          Variable         |         Description         |       Default      |\n| ------------------------- | --------------------------- | ------------------ |\n|           **UID**         | user id (rebuild to change) |         991        |\n|           **GID**         | group id (rebuild to change)|         991        |\n|    **RUN_DB_MIGRATIONS**  | run migrations at startup   |        true        |\n|    **SIDEKIQ_WORKERS**    | number of Sidekiq workers   |          5         |\n\nDon't forget to provide [an environment file](https://github.com/tootsuite/mastodon/blob/main/.env.production.sample) for Mastodon itself.\n\n## Volumes\n|          Variable            |         Description        |\n| -------------------------    | -------------------------- |\n| **/mastodon/public/system**  |         data files         |\n| **/mastodon/log**            |            logs            |\n\n## Ports\n|              Port            |            Use             |\n| -------------------------    | -------------------------- |\n| **3000**                     |        Mastodon web        |\n| **4000**                     |      Mastodon streaming    |\n\n## docker-compose example\nPlease use your own settings and adjust this example to your needs.\nHere I use Traefik v2 (already configured to redirect 80 to 443 globally).\n\n```yaml\nversion: '2.4'\n\nnetworks:\n  http_network:\n    external: true\n\n  mastodon_network:\n    external: false\n    internal: true\n\nservices:\n  mastodon:\n    image: ghcr.io/wonderfall/mastodon\n    container_name: mastodon\n    restart: unless-stopped\n    security_opt:\n      - no-new-privileges:true\n    env_file: /wherever/docker/mastodon/.env.production\n    depends_on:\n      - mastodon-db\n      - mastodon-redis\n    volumes:\n      - /wherever/docker/mastodon/data:/mastodon/public/system\n      - /wherever/docker/mastodon/logs:/mastodon/log\n    labels:\n      - traefik.enable=true\n      - traefik.http.routers.mastodon-web-secure.entrypoints=https\n      - traefik.http.routers.mastodon-web-secure.rule=Host(`domain.tld`)\n      - traefik.http.routers.mastodon-web-secure.tls=true\n      - traefik.http.routers.mastodon-web-secure.middlewares=hsts-headers@file\n      - traefik.http.routers.mastodon-web-secure.tls.certresolver=http\n      - traefik.http.routers.mastodon-web-secure.service=mastodon-web\n      - traefik.http.services.mastodon-web.loadbalancer.server.port=3000\n      - traefik.http.routers.mastodon-streaming-secure.entrypoints=https\n      - traefik.http.routers.mastodon-streaming-secure.rule=Host(`domain.tld`) \u0026\u0026 PathPrefix(`/api/v1/streaming`)\n      - traefik.http.routers.mastodon-streaming-secure.tls=true\n      - traefik.http.routers.mastodon-streaming-secure.middlewares=hsts-headers@file\n      - traefik.http.routers.mastodon-streaming-secure.tls.certresolver=http\n      - traefik.http.routers.mastodon-streaming-secure.service=mastodon-streaming\n      - traefik.http.services.mastodon-streaming.loadbalancer.server.port=4000\n      - traefik.docker.network=http_network\n    networks:\n      - mastodon_network\n      - http_network\n \n   mastodon-redis:\n    image: redis:alpine\n    container_name: mastodon-redis\n    restart: unless-stopped\n    security_opt:\n      - no-new-privileges:true\n    volumes:\n      - /wherever/docker/mastodon/redis:/data\n    networks:\n      - mastodon_network\n\n  mastodon-db:\n    image: postgres:9.6-alpine\n    container_name: mastodon-db\n    restart: unless-stopped\n    security_opt:\n      - no-new-privileges:true\n    volumes:\n      - /wherever/docker/mastodon/db:/var/lib/postgresql/data\n    environment:\n      - POSTGRES_USER=mastodon\n      - POSTGRES_DB=mastodon\n      - POSTGRES_PASSWORD=supersecretpassword\n    networks:\n      - mastodon_network\n```\n\n*This image has been tested and works great with the [gVisor runtime](https://gvisor.dev/).*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonderfall%2Fdocker-mastodon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwonderfall%2Fdocker-mastodon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonderfall%2Fdocker-mastodon/lists"}