From 7e4bb004e0cd8021ff400f51520166b36818b3ca Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Fri, 23 Apr 2021 14:38:13 +0200 Subject: [PATCH] Modernized Koel config --- koel/.env.example | 2 +- koel/docker-compose.yml | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/koel/.env.example b/koel/.env.example index d58e408..9ba0882 100644 --- a/koel/.env.example +++ b/koel/.env.example @@ -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= diff --git a/koel/docker-compose.yml b/koel/docker-compose.yml index 19d6e1a..27975a8 100644 --- a/koel/docker-compose.yml +++ b/koel/docker-compose.yml @@ -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'