2024-01-05 16:18:48 +00:00
|
|
|
---
|
|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
web:
|
|
|
|
image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
|
2024-01-05 23:41:33 +00:00
|
|
|
# build:
|
|
|
|
# context: ../..
|
|
|
|
# dockerfile: contrib/docker/Dockerfile
|
|
|
|
# target: apache-runtime
|
2024-01-05 16:18:48 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
|
|
- "./.env"
|
|
|
|
volumes:
|
|
|
|
- "./.env:/var/www/.env"
|
2024-01-05 16:52:00 +00:00
|
|
|
- "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache"
|
2024-01-05 16:18:48 +00:00
|
|
|
- "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
|
|
|
|
ports:
|
|
|
|
- "${DOCKER_WEB_PORT_EXTERNAL}:80"
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
|
|
|
|
worker:
|
|
|
|
image: "${DOCKER_IMAGE}:${DOCKER_TAG}"
|
2024-01-05 23:41:33 +00:00
|
|
|
# build:
|
|
|
|
# context: ../..
|
|
|
|
# dockerfile: contrib/docker/Dockerfile
|
|
|
|
# target: apache-runtime
|
2024-01-05 16:18:48 +00:00
|
|
|
command: gosu www-data php artisan horizon
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
|
|
- "./.env"
|
|
|
|
volumes:
|
|
|
|
- "./.env:/var/www/.env"
|
2024-01-05 16:52:00 +00:00
|
|
|
- "${DOCKER_DATA_ROOT}/pixelfed/cache:/var/www/bootstrap/cache"
|
2024-01-05 16:18:48 +00:00
|
|
|
- "${DOCKER_DATA_ROOT}/pixelfed/storage:/var/www/storage"
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
|
|
|
|
db:
|
|
|
|
image: mariadb:11.2
|
|
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
|
|
- "./.env"
|
|
|
|
volumes:
|
|
|
|
- "${DOCKER_DATA_ROOT}/db:/var/lib/mysql"
|
|
|
|
ports:
|
|
|
|
- "${DOCKER_DB_PORT_EXTERNAL}:3306"
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:7
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
|
|
- "./.env"
|
|
|
|
volumes:
|
|
|
|
- "${DOCKER_CONFIG_ROOT}/redis:/etc/redis"
|
|
|
|
- "${DOCKER_DATA_ROOT}/redis:/data"
|
|
|
|
ports:
|
|
|
|
- "${DOCKER_REDIS_PORT_EXTERNAL}:6399"
|
|
|
|
healthcheck:
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 2
|
|
|
|
test: ["CMD", "redis-cli", "-p", "6399", "ping"]
|