diff --git a/panel/docker-compose.yml b/panel/docker-compose.yml index b56bfbf..8d06ced 100644 --- a/panel/docker-compose.yml +++ b/panel/docker-compose.yml @@ -13,6 +13,11 @@ services: MYSQL_ROOT_PASSWORD: pterodactyl!! # Change if you want networks: - pterodactyl + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 10s + timeout: 5s + retries: 3 cache: image: "redis:alpine" @@ -20,6 +25,11 @@ services: restart: unless-stopped networks: - pterodactyl + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 10s + timeout: 5s + retries: 3 panel: image: "ghcr.io/pterodactyl/panel:latest" @@ -27,6 +37,14 @@ services: restart: unless-stopped stdin_open: true tty: true + command: > + sh -c " + if ! command -v mysql >/dev/null 2>&1; then + echo 'Installing mysql-client...' + apk update && apk add --no-cache mariadb-client + fi && + php-fpm + " ports: - "8080:80" volumes: @@ -51,6 +69,11 @@ services: SESSION_DRIVER: redis QUEUE_DRIVER: redis REDIS_HOST: cache + depends_on: + db: + condition: service_healthy + cache: + condition: service_healthy networks: - pterodactyl