93 lines
2.1 KiB
YAML
93 lines
2.1 KiB
YAML
networks:
|
|
back:
|
|
mast-int:
|
|
volumes:
|
|
mastodon_public:
|
|
mastodon_redis:
|
|
mastodon_lockfile:
|
|
mastodon_db:
|
|
services:
|
|
### MASTODON
|
|
|
|
mastodon-redis:
|
|
image: redis:7.0-alpine
|
|
healthcheck:
|
|
test: ['CMD', 'redis-cli', 'ping']
|
|
env_file: ../mastodon/env.production
|
|
volumes:
|
|
- mastodon_redis:/data
|
|
networks:
|
|
- mast-int
|
|
|
|
mastodon-web:
|
|
image: tootsuite/mastodon:v4.3.6
|
|
#healthcheck:
|
|
#test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
|
entrypoint:
|
|
- bash
|
|
- -c
|
|
- "cd /opt/mastodon && /usr/bin/tini -- bundle exec rails server"
|
|
env_file: ../mastodon/env.production
|
|
ports:
|
|
- "127.0.0.1:3000:3000"
|
|
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
|
depends_on:
|
|
- mastodon-db
|
|
- mastodon-redis
|
|
- mastodon-streaming
|
|
volumes:
|
|
- type: volume
|
|
source: mastodon_public
|
|
target: /mastodon/public/system
|
|
networks:
|
|
- mast-int
|
|
- back
|
|
|
|
mastodon-streaming:
|
|
image: tootsuite/mastodon-streaming:v4.3.6
|
|
healthcheck:
|
|
test: wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1
|
|
]
|
|
env_file: ../mastodon/env.production
|
|
ports:
|
|
- "127.0.0.1:4000:4000"
|
|
command: node ./streaming
|
|
depends_on:
|
|
- mastodon-db
|
|
- mastodon-redis
|
|
networks:
|
|
- mast-int
|
|
- back
|
|
|
|
mastodon-sidekiq:
|
|
image: tootsuite/mastodon:v4.3.6
|
|
entrypoint:
|
|
- sh
|
|
- -c
|
|
- "/usr/bin/tini -- bundle exec sidekiq"
|
|
healthcheck:
|
|
test: ps aux | grep '[s]idekiq\ 6' || false
|
|
env_file: ../mastodon/env.production
|
|
depends_on:
|
|
- mastodon-db
|
|
- mastodon-redis
|
|
volumes:
|
|
- type: volume
|
|
source: mastodon_public
|
|
target: /mastodon/public/system
|
|
networks:
|
|
- mast-int
|
|
|
|
mastodon-db:
|
|
image: postgres:14.13-alpine
|
|
healthcheck:
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
|
environment:
|
|
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
|
- 'POSTGRES_DB=mastodon'
|
|
volumes:
|
|
- mastodon_db:/var/lib/postgresql/data
|
|
networks:
|
|
- mast-int
|
|
|