mirror of
https://github.com/PAPAMICA/docker-compose-collection.git
synced 2026-01-18 16:27:25 +01:00
Breaking change in latest version of MariaDB server utilities. They don't support mysql command prefix, just mariadb command prefix. example: mysqladmin -> mariadb-admin
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
# Maintainer: Mickael "PAPAMICA" Asseline
|
|
# Update: 2022-05-17
|
|
|
|
#& type: 3
|
|
#& title: MariaDB
|
|
#& description: Mariadb is one of the most popular database servers. Made by the original developers of MySQL.
|
|
#& note: Website: <a href='https://mariadb.org/' target='_blank' rel='noopener'>mariadb.org</a>
|
|
#& categories: SelfHosted, Database, PAPAMICA
|
|
#& platform: linux
|
|
#& logo: https://img.papamica.com/logo/mariadb.png
|
|
|
|
#% SERVICE: Name of the service (No spaces or points) [mariadb]
|
|
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
|
|
#% URL: Service URL (Example: service.papamica.fr or service.com)
|
|
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
|
|
#% TZ: Time zone (Exemple: Europe/Paris) [Europe/Paris]
|
|
#% DB_USER: Database user (No spaces or points) [chevereto]
|
|
#% DB_PASSWORD: Database user password
|
|
#% DB_ROOT: Database root password
|
|
#% DB_NAME: Database name
|
|
|
|
|
|
# Work with Portainer
|
|
services:
|
|
mariadb:
|
|
image: linuxserver/mariadb:latest
|
|
container_name: $SERVICE
|
|
restart: always
|
|
volumes:
|
|
- $DATA_LOCATION/$SERVICE/config:/config
|
|
environment:
|
|
- TZ=$TZ
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- MYSQL_ROOT_PASSWORD=$DB_ROOT
|
|
- MYSQL_DATABASE=$DB_NAME
|
|
- MYSQL_USER=$DB_USER
|
|
- MYSQL_PASSWORD=$DB_PASSWORD
|
|
#- REMOTE_SQL=http://URL1/your.sql,https://URL2/your.sql
|
|
healthcheck:
|
|
test: ["CMD", "mariadb-admin" ,"ping", "-h", "localhost"]
|
|
timeout: 20s
|
|
retries: 10
|
|
labels:
|
|
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
|
|
networks:
|
|
- default
|
|
networks:
|
|
default:
|
|
external:
|
|
name: $NETWORK
|