Added draft for central postgres and mariadb. variables and networks still need to be adapted

This commit is contained in:
2023-12-31 11:14:18 +01:00
parent 3fa052f71d
commit a112b67eda
48 changed files with 340 additions and 213 deletions

View File

@@ -1,19 +1,5 @@
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
{% include 'templates/docker-redis-service.yml.j2' %}
@@ -34,7 +20,9 @@ services:
ports:
- "127.0.0.1:{{http_port}}:3000"
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- database
{% endif %}
- redis
volumes:
- data:/mastodon/public/system
@@ -54,7 +42,9 @@ services:
ports:
- "127.0.0.1:{{stream_port}}:4000"
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- database
{% endif %}
- redis
logging:
driver: journald
@@ -64,7 +54,9 @@ services:
env_file: .env.production
command: bundle exec sidekiq
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- database
{% endif %}
- redis
networks:
- external_network
@@ -75,8 +67,14 @@ services:
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
logging:
driver: journald
{% if not ( enable_central_database | lower | bool ) %}
{% include 'templates/docker-postgres-service.yml.j2' %}
{% endif %}
volumes:
{% if not ( enable_central_database | lower | bool ) %}
database:
{% endif %}
redis:
data:
networks: