hpc-cloud/files/mysql.service

17 lines
426 B
SYSTEMD
Raw Normal View History

2017-04-18 13:17:32 +02:00
[Unit]
Description=Mariadb Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull mariadb:10.1.22
ExecStart=/usr/bin/docker run -p 3306:3306 --name %n -v /srv/lib/mysql:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=geheim mariadb:10.1.22
[Install]
WantedBy=multi-user.target