131 lines
3.0 KiB
YAML
131 lines
3.0 KiB
YAML
services:
|
|
db:
|
|
image: mariadb:11
|
|
container_name: nexxo_db
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
MARIADB_DATABASE: ${DB_DATABASE}
|
|
MARIADB_USER: ${DB_USERNAME}
|
|
MARIADB_PASSWORD: ${DB_PASSWORD}
|
|
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
|
ports:
|
|
- "3306:3306"
|
|
volumes:
|
|
- ./db_data:/var/lib/mysql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "mariadb-admin ping -h localhost -u root -p$$MARIADB_ROOT_PASSWORD || exit 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 20s
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/php/Dockerfile
|
|
image: nexxo-php
|
|
container_name: nexxo_app
|
|
restart: unless-stopped
|
|
working_dir: /var/www/html
|
|
ports:
|
|
- "5173:5173"
|
|
volumes:
|
|
- ./src:/var/www/html
|
|
- /mnt/videos:/mnt/videos
|
|
environment:
|
|
DB_HOST: db
|
|
REDIS_HOST: redis
|
|
XDG_CONFIG_HOME: /tmp
|
|
PSYSH_CONFIG_DIR: /tmp/psysh
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
web:
|
|
image: nginx:alpine
|
|
container_name: nexxo_web
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./src:/var/www/html:ro
|
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- /mnt/videos:/mnt/videos
|
|
depends_on:
|
|
- app
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: nexxo_redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:6379:6379"
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
|
|
worker:
|
|
image: nexxo-php
|
|
container_name: nexxo_worker
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./src:/var/www/html
|
|
- /mnt/videos:/mnt/videos
|
|
environment:
|
|
DB_HOST: db
|
|
REDIS_HOST: redis
|
|
QUEUE_CONNECTION: redis
|
|
command: >
|
|
sh -c '
|
|
until nc -z db 3306; do sleep 1; done;
|
|
until nc -z redis 6379; do sleep 1; done;
|
|
php artisan queue:work redis --sleep=1 --tries=3 --timeout=120
|
|
'
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
|
|
scheduler:
|
|
image: nexxo-php
|
|
container_name: nexxo_scheduler
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./src:/var/www/html
|
|
environment:
|
|
DB_HOST: db
|
|
REDIS_HOST: redis
|
|
command: >
|
|
sh -c '
|
|
until nc -z db 3306; do sleep 1; done;
|
|
php artisan schedule:work
|
|
'
|
|
depends_on:
|
|
- db
|
|
|
|
tus:
|
|
image: tusproject/tusd
|
|
container_name: tusd
|
|
restart: unless-stopped
|
|
ports:
|
|
- "1080:1080"
|
|
volumes:
|
|
- /mnt/videos:/data
|
|
command:
|
|
- "-host=0.0.0.0"
|
|
- "-port=1080"
|
|
- "-upload-dir=/data"
|
|
- "-base-path=/files/"
|
|
- "-behind-proxy=true"
|
|
- "-cors-allow-origin=.*"
|
|
- "-cors-allow-headers=.*"
|
|
|
|
|
|
# command: >
|
|
# -host=0.0.0.0
|
|
# -port=1080
|
|
# -upload-dir=/data
|
|
# -base-path=/files/
|
|
# -cors-allow-origin=*
|
|
# -cors-allow-methods=POST,GET,HEAD,PATCH,OPTIONS
|
|
# -cors-allow-headers=*
|
|
# -cors-allow-origin=http://10.10.90.125
|
|
# -cors-allow-headers=Upload-Token,Content-Type,Upload-Length,Upload-Metadata,Upload-Offset,Tus-Resumable |