Auto database creating

This commit is contained in:
Filip Izydorczyk 2020-08-24 10:18:42 +02:00
parent 15f72cedd2
commit 2f0448513f
2 changed files with 4 additions and 0 deletions

1
init.sql Normal file
View File

@ -0,0 +1 @@
CREATE DATABASE IF NOT EXISTS test;

View File

@ -5,6 +5,9 @@ services:
db:
image: mariadb
restart: always
command: --init-file /data/application/init.sql
volumes:
- ./init.sql:/data/application/init.sql
environment:
MYSQL_ROOT_PASSWORD: example
expose: