Navigation Menu

Skip to content

MariaDB / MySQL service is unealthy #25118

Answered by weide-zhou
tristanbes asked this question in Actions
Discussion options

You must be logged in to vote

Hi @tristanbes ,

This is due to the top level env setting is not applied to the github services(‘docker create’ command in the execution step). Need to set in ‘jobs.<job_id>.services.env’ level. Code sample below:

env:
    TZ: Europe/Paris
    PHP_VERSION: 7.4
    NODE_VERSION: 10.x
    COMPOSER_ALLOW_SUPERUSER: '1' # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
jobs:
    php:
        runs-on: ubuntu-latest
        services:
            mysql:
                image: mariadb:10.4
                env:
                  MYSQL_ROOT_PASSWORD: symfony
                  MYSQL_DATABASE: symfony
                ports:
                  - 3306/tcp
                options: --health…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants