Add mastodon
This commit is contained in:
		
							parent
							
								
									569425fe67
								
							
						
					
					
						commit
						bf83184579
					
				
					 2 changed files with 90 additions and 0 deletions
				
			
		
							
								
								
									
										7
									
								
								mastodon/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								mastodon/README.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
# mastodon
 | 
			
		||||
 | 
			
		||||
Your self-hosted, globally interconnected microblogging community
 | 
			
		||||
 | 
			
		||||
## Important step when deploying
 | 
			
		||||
 | 
			
		||||
Set the environment variables according to https://docs.joinmastodon.org/admin/config/
 | 
			
		||||
							
								
								
									
										83
									
								
								mastodon/docker-compose.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								mastodon/docker-compose.yaml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,83 @@
 | 
			
		|||
version: '3.3'
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
  db:
 | 
			
		||||
    restart: unless-stopped
 | 
			
		||||
    image: postgres:${postgres_version:-14-alpine}
 | 
			
		||||
    shm_size: 256mb
 | 
			
		||||
    networks:
 | 
			
		||||
      - internal_network
 | 
			
		||||
    healthcheck:
 | 
			
		||||
      test: ['CMD', 'pg_isready', '-U', 'postgres']
 | 
			
		||||
    volumes:
 | 
			
		||||
      - postgres:/var/lib/postgresql/data
 | 
			
		||||
    environment:
 | 
			
		||||
      - 'POSTGRES_USER=mastodon'
 | 
			
		||||
      - 'POSTGRES_PASSWORD=mastodon'
 | 
			
		||||
      - 'POSTGRES_DB=mastodon'
 | 
			
		||||
 | 
			
		||||
  redis:
 | 
			
		||||
    restart: unless-stopped
 | 
			
		||||
    image: redis:${redis_version}
 | 
			
		||||
    networks:
 | 
			
		||||
      - internal_network
 | 
			
		||||
    healthcheck:
 | 
			
		||||
      test: ['CMD', 'redis-cli', 'ping']
 | 
			
		||||
    volumes:
 | 
			
		||||
      - redis:/data
 | 
			
		||||
 | 
			
		||||
  web:
 | 
			
		||||
    image: ghcr.io/mastodon/mastodon:${mastodon_version}
 | 
			
		||||
    restart: unless-stopped
 | 
			
		||||
    env_file: ../stack.env
 | 
			
		||||
    command: bundle exec puma -C config/puma.rb
 | 
			
		||||
    networks:
 | 
			
		||||
      - external_network
 | 
			
		||||
      - internal_network
 | 
			
		||||
    healthcheck:
 | 
			
		||||
      test: ['CMD-SHELL',"curl -s --noproxy localhost localhost:3000/health | grep -q 'OK' || exit 1"]
 | 
			
		||||
    depends_on:
 | 
			
		||||
      - db
 | 
			
		||||
      - redis
 | 
			
		||||
    volumes:
 | 
			
		||||
      - system:/mastodon/public/system
 | 
			
		||||
 | 
			
		||||
  streaming:
 | 
			
		||||
    image: ghcr.io/mastodon/mastodon-streaming:${mastodon_version}
 | 
			
		||||
    restart: unless-stopped
 | 
			
		||||
    env_file: ../stack.env
 | 
			
		||||
    command: node ./streaming/index.js
 | 
			
		||||
    networks:
 | 
			
		||||
      - external_network
 | 
			
		||||
      - internal_network
 | 
			
		||||
    healthcheck:
 | 
			
		||||
      test: ['CMD-SHELL', "curl -s --noproxy localhost localhost:4000/api/v1/streaming/health | grep -q 'OK' || exit 1"]
 | 
			
		||||
    depends_on:
 | 
			
		||||
      - db
 | 
			
		||||
      - redis
 | 
			
		||||
 | 
			
		||||
  sidekiq:
 | 
			
		||||
    image: ghcr.io/mastodon/mastodon:${mastodon_version}
 | 
			
		||||
    restart: unless-stopped
 | 
			
		||||
    env_file: ../stack.env
 | 
			
		||||
    command: bundle exec sidekiq
 | 
			
		||||
    depends_on:
 | 
			
		||||
      - db
 | 
			
		||||
      - redis
 | 
			
		||||
    networks:
 | 
			
		||||
      - external_network
 | 
			
		||||
      - internal_network
 | 
			
		||||
    volumes:
 | 
			
		||||
      - system:/mastodon/public/system
 | 
			
		||||
    healthcheck:
 | 
			
		||||
      test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
 | 
			
		||||
 | 
			
		||||
networks:
 | 
			
		||||
  external_network:
 | 
			
		||||
  internal_network:
 | 
			
		||||
    internal: true
 | 
			
		||||
 | 
			
		||||
volumes:
 | 
			
		||||
  system:
 | 
			
		||||
  redis:
 | 
			
		||||
  postgres:
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue