84 lines
1.9 KiB
YAML
84 lines
1.9 KiB
YAML
|
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:
|