implemented mastodon

This commit is contained in:
2022-11-15 21:43:05 +01:00
parent 6a17d1ced1
commit 45841aceac
4 changed files with 60 additions and 98 deletions

View File

@@ -1,23 +1,19 @@
version: '3'
services:
database:
restart: always
image: postgres:14-alpine
shm_size: 256mb
networks:
- internal_network
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'postgres']
volumes:
- database:/var/lib/postgresql/data
environment:
- 'POSTGRES_HOST_AUTH_METHOD=trust'
logging:
driver: journald
image: mariadb:10.5
command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW"
environment:
MYSQL_DATABASE: "mastodon"
MYSQL_USER: "mastodon"
MYSQL_PASSWORD: "{{mastodon_database_password}}"
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
volumes:
- database:/var/lib/mysql
restart: always
healthcheck:
test: "/usr/bin/mysql --user=mastodon --password={{mastodon_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
redis:
restart: always
image: redis:7-alpine
@@ -27,9 +23,9 @@ services:
test: ['CMD', 'redis-cli', 'ping']
volumes:
- redis:/data
logging:
driver: journald
web:
build: .
image: tootsuite/mastodon:{{mastodon_version}}
restart: always
env_file: .env.production
@@ -47,9 +43,9 @@ services:
- redis
volumes:
- data:/mastodon/public/system
logging:
driver: journald
streaming:
build: .
image: tootsuite/mastodon:{{mastodon_version}}
restart: always
env_file: .env.production
@@ -65,9 +61,9 @@ services:
depends_on:
- database
- redis
logging:
driver: journald
sidekiq:
build: .
image: tootsuite/mastodon:{{mastodon_version}}
restart: always
env_file: .env.production
@@ -82,6 +78,8 @@ services:
- data:/mastodon/public/system
healthcheck:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
logging:
driver: journald
volumes:
database:
redis: