Skip to content

Instantly share code, notes, and snippets.

@kiranparajuli589
Created August 3, 2022 11:33
Show Gist options
  • Save kiranparajuli589/b6b8a8ab28c9249f22fa4180ca2c5de1 to your computer and use it in GitHub Desktop.
Save kiranparajuli589/b6b8a8ab28c9249f22fa4180ca2c5de1 to your computer and use it in GitHub Desktop.
Docker Compose for MariaDB|MySQL with Healthcheck
version: "3.8"
services:
db:
image: mariadb
container_name: mariadb
restart: always
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping" ]
timeout: 3m
interval: 10s
retries: 10
ports:
- "3333:3306"
environment:
MYSQL_DATABASE: "phedondb"
MYSQL_USER: "phedon"
MYSQL_PASSWORD: "12345"
MYSQL_ROOT_PASSWORD: "12345"
MYSQL_PWD: "12345"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment