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

@@ -15,7 +15,9 @@ services:
ports:
- "{{http_port}}:80"
depends_on:
{% if not ( enable_central_database | lower | bool ) %}
- database
{% endif %}
- redis
worker:
image: zknt/pixelfed
@@ -29,22 +31,27 @@ services:
- "bootstrap:/var/www/bootstrap"
- "./env:/var/www/.env"
entrypoint: /worker-entrypoint.sh
depends_on:
- database
- redis
- application
healthcheck:
test: php artisan horizon:status | grep running
interval: 60s
timeout: 5s
retries: 1
depends_on:
- redis
- application
{% if not ( enable_central_database | lower | bool ) %}
- database
{% include 'templates/docker-mariadb-service.yml.j2' %}
{% endif %}
{% include 'templates/docker-redis-service.yml.j2' %}
volumes:
{% if not ( enable_central_database | lower | bool ) %}
database:
{% endif %}
redis:
application_data:
bootstrap:

View File

@@ -56,17 +56,11 @@ MAIL_ENCRYPTION=tls
## Databases (MySQL)
DB_CONNECTION=mysql
DB_DATABASE=pixelfed
DB_HOST=database
DB_DATABASE={{database_databasename}}
DB_HOST={{database_host}}
DB_PASSWORD="{{pixelfed_database_password}}"
DB_PORT=3306
DB_USERNAME=pixelfed
# pass the same values to the db itself
MYSQL_DATABASE="pixelfed"
MYSQL_USER="pixelfed"
MYSQL_PASSWORD="{{pixelfed_database_password}}"
MYSQL_ROOT_PASSWORD="{{pixelfed_database_password}}"
MARIADB_AUTO_UPGRADE="1"
DB_USERNAME={{database_username}}
## Cache (Redis)
REDIS_CLIENT=phpredis