2022-11-15 11:56:48 +01:00
|
|
|
version: '3'
|
|
|
|
services:
|
2023-12-26 16:40:19 +01:00
|
|
|
|
|
|
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
|
|
|
|
2022-11-15 11:56:48 +01:00
|
|
|
networks:
|
|
|
|
- internal_network
|
2023-12-26 16:40:19 +01:00
|
|
|
|
2022-11-15 11:56:48 +01:00
|
|
|
web:
|
2023-12-13 15:16:02 +01:00
|
|
|
image: tootsuite/mastodon:{{version_mastodon}}
|
2022-11-15 11:56:48 +01:00
|
|
|
restart: always
|
|
|
|
env_file: .env.production
|
|
|
|
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
|
|
|
networks:
|
|
|
|
- external_network
|
|
|
|
- internal_network
|
|
|
|
healthcheck:
|
|
|
|
# prettier-ignore
|
|
|
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:{{http_port}}:3000"
|
|
|
|
depends_on:
|
2024-01-02 12:23:25 +01:00
|
|
|
{% if not enable_central_database %}
|
2022-11-15 11:56:48 +01:00
|
|
|
- database
|
2023-12-31 11:14:18 +01:00
|
|
|
{% endif %}
|
2022-11-15 11:56:48 +01:00
|
|
|
- redis
|
|
|
|
volumes:
|
|
|
|
- data:/mastodon/public/system
|
2022-11-15 21:43:05 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2022-11-15 11:56:48 +01:00
|
|
|
streaming:
|
2023-12-13 15:16:02 +01:00
|
|
|
image: tootsuite/mastodon:{{version_mastodon}}
|
2022-11-15 11:56:48 +01:00
|
|
|
restart: always
|
|
|
|
env_file: .env.production
|
|
|
|
command: node ./streaming
|
|
|
|
networks:
|
|
|
|
- external_network
|
|
|
|
- internal_network
|
|
|
|
healthcheck:
|
|
|
|
# prettier-ignore
|
|
|
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:{{stream_port}}:4000"
|
|
|
|
depends_on:
|
2024-01-02 12:23:25 +01:00
|
|
|
{% if not enable_central_database %}
|
2022-11-15 11:56:48 +01:00
|
|
|
- database
|
2023-12-31 11:14:18 +01:00
|
|
|
{% endif %}
|
2022-11-15 11:56:48 +01:00
|
|
|
- redis
|
2022-11-15 21:43:05 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2022-11-15 11:56:48 +01:00
|
|
|
sidekiq:
|
2023-12-13 15:16:02 +01:00
|
|
|
image: tootsuite/mastodon:{{version_mastodon}}
|
2022-11-15 11:56:48 +01:00
|
|
|
restart: always
|
|
|
|
env_file: .env.production
|
|
|
|
command: bundle exec sidekiq
|
|
|
|
depends_on:
|
2024-01-02 12:23:25 +01:00
|
|
|
{% if not enable_central_database %}
|
2022-11-15 11:56:48 +01:00
|
|
|
- database
|
2023-12-31 11:14:18 +01:00
|
|
|
{% endif %}
|
2022-11-15 11:56:48 +01:00
|
|
|
- redis
|
|
|
|
networks:
|
|
|
|
- external_network
|
|
|
|
- internal_network
|
|
|
|
volumes:
|
|
|
|
- data:/mastodon/public/system
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
2022-11-15 21:43:05 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2024-01-02 12:23:25 +01:00
|
|
|
{% if not enable_central_database %}
|
2023-12-31 11:14:18 +01:00
|
|
|
{% include 'templates/docker-postgres-service.yml.j2' %}
|
|
|
|
{% endif %}
|
|
|
|
|
2022-11-15 11:56:48 +01:00
|
|
|
volumes:
|
2024-01-02 12:23:25 +01:00
|
|
|
{% if not enable_central_database %}
|
2022-11-15 11:56:48 +01:00
|
|
|
database:
|
2023-12-31 11:14:18 +01:00
|
|
|
{% endif %}
|
2022-11-15 11:56:48 +01:00
|
|
|
redis:
|
|
|
|
data:
|
|
|
|
networks:
|
|
|
|
external_network:
|
|
|
|
internal_network:
|
|
|
|
internal: true
|