mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
added builder script
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Mariadb
|
||||
|
||||
Dockerhub: https://hub.docker.com/_/mariadb
|
||||
|
||||
It will be quite uncommon to just use this compose file, it's likely you are extending this from another project.
|
||||
That's the main context of this container.
|
||||
|
||||
## Sample
|
||||
|
||||
### Run multiple databases
|
||||
|
||||
initdb/init.sql
|
||||
|
||||
```sql
|
||||
|
||||
-- Create BookStack database and user
|
||||
CREATE DATABASE IF NOT EXISTS bookstack_db;
|
||||
CREATE USER IF NOT EXISTS 'bookstack_user'@'%' IDENTIFIED BY 'bookstack_password';
|
||||
GRANT ALL PRIVILEGES ON bookstack_db.* TO 'bookstack_user'@'%';
|
||||
|
||||
-- Create WordPress database and user
|
||||
CREATE DATABASE IF NOT EXISTS wordpress_db;
|
||||
CREATE USER IF NOT EXISTS 'wordpress_user'@'%' IDENTIFIED BY 'wordpress_password';
|
||||
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wordpress_user'@'%';
|
||||
|
||||
FLUSH PRIVILEGES;
|
||||
```
|
||||
Reference in New Issue
Block a user