Modernized Koel config

pull/10/head
Jef Roosens 2021-04-23 14:38:13 +02:00
parent 0172b193a1
commit 7e4bb004e0
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
2 changed files with 17 additions and 11 deletions

View File

@ -12,7 +12,7 @@ DB_HOST=db
DB_PORT=3306
DB_DATABASE=koel
DB_USERNAME=koel
DB_PASSWORD=changeme
DB_PASSWORD=koel
# A random 32-char string. You can leave this empty if use php artisan koel:init.
APP_KEY=

View File

@ -1,14 +1,22 @@
version: '3.5'
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'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
db:
# Haven't found a good MySQL healthcheck yet
condition: 'service_started'
networks:
- 'default'
- 'nginx'
@ -18,17 +26,15 @@ services:
- 'music:/music'
db:
image: 'mysql:8'
image: 'mysql:8.0.24'
restart: 'always'
command: '--default-authentication-plugin=mysql_native_password'
environment:
- 'MYSQL_DATABASE=koel'
- 'MYSQL_PASSWORD=$DB_PASSWORD'
- 'MYSQL_ROOT_PASSWORD=$DB_PASSWORD'
- 'MYSQL_USER=$DB_USERNAME'
labels:
- 'com.centurylinklabs.watchtower.enable=true'
- 'MYSQL_USER=koel'
- 'MYSQL_PASSWORD=koel'
- 'MYSQL_RANDOM_ROOT_PASSWORD=yes'
volumes:
- 'db-data:/var/lib/mysql'