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.
12 行
无行尾
376 B
Text
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 |