49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
version: '2.4'
|
|
|
|
services:
|
|
app:
|
|
# This repository sadly only has a 'latest' flag
|
|
image: 'hyzual/koel:latest'
|
|
restart: 'always'
|
|
|
|
healthcheck:
|
|
test: 'curl -f localhost:80 || exit 1'
|
|
interval: '1m'
|
|
timeout: '10s'
|
|
retries: 3
|
|
start_period: '10s'
|
|
depends_on:
|
|
db:
|
|
# Haven't found a good MySQL healthcheck yet
|
|
condition: 'service_started'
|
|
|
|
networks:
|
|
- 'default'
|
|
- 'nginx'
|
|
volumes:
|
|
- './.env:/var/www/html/.env'
|
|
- 'covers:/var/www/html/public/img/covers'
|
|
- 'music:/music'
|
|
|
|
db:
|
|
image: 'mysql:8.0.24'
|
|
restart: 'always'
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
|
|
|
environment:
|
|
- 'MYSQL_DATABASE=koel'
|
|
- 'MYSQL_USER=koel'
|
|
- 'MYSQL_PASSWORD=koel'
|
|
- 'MYSQL_RANDOM_ROOT_PASSWORD=yes'
|
|
volumes:
|
|
- 'db-data:/var/lib/mysql'
|
|
|
|
networks:
|
|
nginx:
|
|
external: true
|
|
|
|
volumes:
|
|
covers:
|
|
db-data:
|
|
music:
|