Add named volume for database

This commit is contained in:
Adam Goldsmith 2021-07-07 15:43:33 -04:00
parent b4ea4452e3
commit a85b4a1a5e

View File

@ -14,9 +14,13 @@ services:
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro
database: database:
image: mariadb image: mariadb
volumes:
- mysql-vol:/var/lib/mysql
restart: always restart: always
env_file: .env env_file: .env
environment: environment:
MYSQL_DATABASE: mediawiki MYSQL_DATABASE: mediawiki
#MYSQL_USER and MYSQL_PASSWORD in .env #MYSQL_USER and MYSQL_PASSWORD in .env
MYSQL_RANDOM_ROOT_PASSWORD: 'yes' MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
volumes:
mysql-vol: