2017-04-18 13:17:32 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Mariadb Container
|
|
|
|
After=docker.service
|
|
|
|
Requires=docker.service
|
2017-06-22 09:19:08 +02:00
|
|
|
|
2017-04-18 13:17:32 +02:00
|
|
|
[Service]
|
|
|
|
TimeoutStartSec=0
|
|
|
|
Restart=always
|
2017-08-14 16:40:06 +02:00
|
|
|
ExecStartPre=-/usr/bin/docker kill %n || /bin/true
|
2017-04-18 13:17:32 +02:00
|
|
|
ExecStartPre=-/usr/bin/docker rm %n
|
2017-06-02 12:00:19 +02:00
|
|
|
ExecStartPre=/usr/bin/docker pull mariadb:10.2
|
2017-10-18 09:23:04 +02:00
|
|
|
ExecStart=/usr/bin/docker run --name %n \
|
2017-10-31 13:38:22 +01:00
|
|
|
--network host \
|
2017-06-22 09:19:08 +02:00
|
|
|
-v /srv/mariadb/lib/mysql:/var/lib/mysql \
|
2017-10-18 09:23:04 +02:00
|
|
|
-v /srv/mariadb/etc/mysql/conf.d:/etc/mysql/conf.d \
|
2017-10-20 08:57:25 +02:00
|
|
|
-e MYSQL_ROOT_PASSWORD={{ secrets['MYSQL_ROOT_PASSWORD'] }} mariadb:10.2 {{ mariadb_args }}
|
2017-06-22 09:19:08 +02:00
|
|
|
|
2017-04-18 13:17:32 +02:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|