-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
34 lines (33 loc) · 1.18 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
version: '2.4'
services:
mariadb:
#build:
# context: ./
# dockerfile: alpine.10_11.Dockerfile
image: tobi312/rpi-mariadb:10.11-alpine
#image: tobi312/rpi-mariadb:10.11-debian
container_name: mariadb
restart: unless-stopped
volumes:
- ./mariadb-data:/var/lib/mysql:rw
environment:
TZ: Europe/Berlin
#MARIADB_RANDOM_ROOT_PASSWORD: "yes"
MARIADB_ROOT_PASSWORD: my-secret-pw
MARIADB_DATABASE: user-database
MARIADB_USER: example-user
MARIADB_PASSWORD: my_cool_secret
MARIADB_MYSQL_LOCALHOST_USER: true # need for healthcheck.sh
#MARIADB_AUTO_UPGRADE: "true"
ports:
- 3306:3306
#command: mysqld --innodb-buffer-pool-size=256M
healthcheck:
#test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MARIADB_ROOT_PASSWORD || exit 1
#test: mysqladmin ping -h 127.0.0.1 -u $$MARIADB_USER --password=$$MARIADB_PASSWORD || exit 1
# https://github.com/MariaDB/mariadb-docker/issues/94#issuecomment-1069429616
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
interval: 60s
timeout: 5s
retries: 5
#start_period: 30s