Cloudlog/Dockerfile-db
Peter Goodhall 531cb1b1e3 Update Docker setup and improve health checks
Dockerfile now copies and sets up script.sh as startup.sh. Dockerfile-db adds a custom healthcheck script using mariadb-admin. docker-compose.yml updates service commands, healthcheck configuration, and dependency conditions. script.sh improves database readiness logic. Minor fix in migration file to remove BOM character.
2025-08-09 18:05:31 +01:00

12 行
无行尾
376 B
Text

# Dockerfile-db
FROM mariadb:latest
# Add the install.sql file to the docker image
ADD install/assets/install.sql /docker-entrypoint-initdb.d
# Create a healthcheck script that uses mariadb-admin
RUN echo '#!/bin/bash\nmariadb-admin ping -h "localhost" --silent' > /usr/local/bin/healthcheck.sh \
&& chmod +x /usr/local/bin/healthcheck.sh
# Expose port 3306
EXPOSE 3306