Created
July 23, 2023 19:41
-
-
Save e-dreyer/391057ff3e6b035ff030a7bbfbe60d5e to your computer and use it in GitHub Desktop.
Mastodon Docker compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
mastodon: | |
build: | |
context: . # The path to the directory containing the Dockerfile | |
dockerfile: Dockerfile | |
ports: | |
- "3000:3000" | |
- "4000:4000" | |
volumes: | |
- ./mastodon:/mastodon/public/system # Mounting the storage volume for uploaded files | |
environment: | |
- VIRTUAL_HOST=your-domain.com # Replace with your actual domain | |
- LETSENCRYPT_HOST=your-domain.com # Replace with your actual domain | |
- [email protected] # Replace with your email address | |
depends_on: | |
- postgres | |
- redis | |
restart: always | |
postgres: | |
image: postgres:12 | |
volumes: | |
- postgres-data:/var/lib/postgresql/data | |
environment: | |
- POSTGRES_USER=mastodon | |
- POSTGRES_PASSWORD=mastodon | |
- POSTGRES_DB=mastodon_production | |
restart: always | |
redis: | |
image: redis:6-alpine | |
volumes: | |
- redis-data:/data | |
restart: always | |
volumes: | |
postgres-data: | |
redis-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment