move mastodon database to central server
This commit is contained in:
parent
d8937ade41
commit
06fb6a5286
1 changed files with 9 additions and 33 deletions
|
@ -14,27 +14,6 @@ volumes:
|
|||
device: ":/mnt/data/mastodon/system"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:14-alpine
|
||||
networks:
|
||||
mastodon:
|
||||
aliases:
|
||||
- db
|
||||
healthcheck:
|
||||
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /mnt/data/mastodon/postgres14
|
||||
target: /var/lib/postgresql/data
|
||||
environment:
|
||||
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
||||
- 'POSTGRES_PASSWORD={{ mastodon_postgres_password }}'
|
||||
- 'POSTGRES_DB=mastodon_production'
|
||||
- 'POSTGRES_USER=mastodon'
|
||||
deploy:
|
||||
placement:
|
||||
constraints:
|
||||
- "node.labels.mastodon == true"
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
|
@ -59,10 +38,10 @@ services:
|
|||
- 'OTP_SECRET={{ otp_secret }}'
|
||||
- 'SECRET_KEY_BASE={{ secret_key_base }}'
|
||||
- 'REDIS_HOST=redis'
|
||||
- 'DB_HOST=db'
|
||||
- 'DB_HOST=192.168.30.10'
|
||||
- 'DB_USER=mastodon'
|
||||
- 'DB_NAME=mastodon_production'
|
||||
- 'DB_PASS=password'
|
||||
- 'DB_NAME=mastodon'
|
||||
- 'DB_PASS={{ database_passwords.mastodon }}'
|
||||
- 'VAPID_PRIVATE_KEY={{ vapid_private_key }}'
|
||||
- 'VAPID_PUBLIC_KEY=BDcpOP2ThgD13i2ENjnlVXG7QH-m3xuNE4rySx6_NBYQz34UxSM3N4nT7GUxN5zBF-Kehlv0CpqBDDa78QFiS0g='
|
||||
- 'SMTP_SERVER=smtp.tweak.nl'
|
||||
|
@ -78,7 +57,6 @@ services:
|
|||
healthcheck:
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
volumes:
|
||||
- type: volume
|
||||
|
@ -109,10 +87,10 @@ services:
|
|||
environment:
|
||||
- 'REDIS_HOST=redis'
|
||||
- 'LOCAL_DOMAIN=social.pizzapim.nl'
|
||||
- 'DB_HOST=db'
|
||||
- 'DB_HOST=192.168.30.10'
|
||||
- 'DB_USER=mastodon'
|
||||
- 'DB_NAME=mastodon_production'
|
||||
- 'DB_PASS=password'
|
||||
- 'DB_NAME=mastodon'
|
||||
- 'DB_PASS={{ database_passwords.mastodon }}'
|
||||
networks:
|
||||
- mastodon
|
||||
- traefik
|
||||
|
@ -120,7 +98,6 @@ services:
|
|||
# prettier-ignore
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
deploy:
|
||||
placement:
|
||||
|
@ -142,12 +119,11 @@ services:
|
|||
- 'OTP_SECRET={{ otp_secret }}'
|
||||
- 'SECRET_KEY_BASE={{ secret_key_base }}'
|
||||
- 'REDIS_HOST=redis'
|
||||
- 'DB_HOST=db'
|
||||
- 'DB_HOST=192.168.30.10'
|
||||
- 'DB_USER=mastodon'
|
||||
- 'DB_NAME=mastodon_production'
|
||||
- 'DB_PASS=password'
|
||||
- 'DB_NAME=mastodon'
|
||||
- 'DB_PASS={{ database_passwords.mastodon }}'
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
networks:
|
||||
- mastodon
|
||||
|
|
Reference in a new issue