diff --git a/docker-compose.yml b/docker-compose.yml index 9c28d29..02ca264 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,8 @@ mem_limit: 2g restart: always depends_on: - - mysql-gitbucket + mysql-gitbucket: + condition: service_healthy environment: - GITBUCKET_USER_ID=${GITBUCKET_USER_ID:-9000} - GITBUCKET_DATABASE_HOST=172.22.2.251 @@ -32,8 +33,14 @@ - gitbucket mysql-gitbucket: - image: mysql:5.7 + image: mariadb:10.2 restart: always + command: mysqld --skip-name-resolve --skip-host-cache --log-warnings=0 + healthcheck: + test: ["CMD", "mysqladmin", "-u$GITBUCKET_DATABASE_USER", "-p$GITBUCKET_DATABASE_PASSWORD", "ping", "-h", "localhost"] + interval: 30s + timeout: 30s + retries: 10 environment: - MYSQL_ROOT_PASSWORD=${GITBUCKET_DATABASE_ROOT} - MYSQL_DATABASE=${GITBUCKET_DATABASE_NAME}