computer-playbook/roles/docker-pixelfed/templates/docker-compose.yml.j2

57 lines
1.1 KiB
Django/Jinja

version: '2'
services:
application:
image: zknt/pixelfed
restart: always
logging:
driver: journald
env_file:
- ./env
volumes:
- "application_data:/var/www/storage"
- "bootstrap:/var/www/bootstrap"
- "./env:/var/www/.env"
ports:
- "{{http_port}}:80"
depends_on:
{% if not enable_central_database %}
- database
{% endif %}
- redis
worker:
image: zknt/pixelfed
restart: always
logging:
driver: journald
env_file:
- ./env
volumes:
- "application_data:/var/www/storage"
- "bootstrap:/var/www/bootstrap"
- "./env:/var/www/.env"
entrypoint: /worker-entrypoint.sh
healthcheck:
test: php artisan horizon:status | grep running
interval: 60s
timeout: 5s
retries: 1
depends_on:
- redis
- application
{% if not enable_central_database %}
- database
{% include 'templates/docker-mariadb-service.yml.j2' %}
{% endif %}
{% include 'templates/docker-redis-service.yml.j2' %}
volumes:
{% if not enable_central_database %}
database:
{% endif %}
redis:
application_data:
bootstrap: