mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Added draft for central postgres and mariadb. variables and networks still need to be adapted
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user