mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-10 15:01:05 +01:00
71 lines
1.5 KiB
Django/Jinja
71 lines
1.5 KiB
Django/Jinja
version: '2'
|
|
|
|
services:
|
|
application:
|
|
image: zknt/pixelfed
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: journald
|
|
env_file:
|
|
- ./env
|
|
volumes:
|
|
- "application_data:/var/www/storage"
|
|
- "./env:/var/www/.env"
|
|
ports:
|
|
- "{{http_port}}:80"
|
|
depends_on:
|
|
- database
|
|
- redis
|
|
worker:
|
|
image: zknt/pixelfed
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: journald
|
|
env_file:
|
|
- ./env
|
|
volumes:
|
|
- "application_data:/var/www/storage"
|
|
- "./env:/var/www/.env"
|
|
entrypoint: /worker-entrypoint.sh
|
|
depends_on:
|
|
- database
|
|
- redis
|
|
- app
|
|
healthcheck:
|
|
test: php artisan horizon:status | grep running
|
|
interval: 60s
|
|
timeout: 5s
|
|
retries: 1
|
|
database:
|
|
logging:
|
|
driver: journald
|
|
image: mariadb
|
|
restart: always
|
|
environment:
|
|
MYSQL_DATABASE: "pixelfed"
|
|
MYSQL_USER: "pixelfed"
|
|
MYSQL_PASSWORD: "{{pixelfed_database_password}}"
|
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
|
volumes:
|
|
- database:/var/lib/mysql
|
|
healthcheck:
|
|
test: "/usr/bin/mysql --user=pixelfed --password={{pixelfed_database_password}} --execute \"SHOW DATABASES;\""
|
|
interval: 3s
|
|
timeout: 1s
|
|
retries: 5
|
|
redis:
|
|
image: redis:alpine
|
|
restart: always
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
- redis:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 1s
|
|
timeout: 3s
|
|
retries: 30
|
|
volumes:
|
|
database:
|
|
redis_data:
|
|
application_data: |