env file updated and automate database creation
This commit is contained in:
parent
3178bc0748
commit
880b5423b7
|
@ -0,0 +1,7 @@
|
|||
# root user
|
||||
MYSQL_ROOT_PASSWORD=roottoor
|
||||
|
||||
# custom user
|
||||
MYSQL_USER=sskender
|
||||
MYSQL_PASSWORD=password123
|
||||
MYSQL_DATABASE=mydatabase
|
|
@ -8,17 +8,15 @@ services:
|
|||
build:
|
||||
context: ./mariadb
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=rootpassword
|
||||
env_file:
|
||||
- mariadb.env
|
||||
- ".env"
|
||||
networks:
|
||||
- intranet
|
||||
ports:
|
||||
- "3306:3306"
|
||||
restart: always
|
||||
volumes:
|
||||
- mariadb:/var/lib/mysql
|
||||
- db_data:/var/lib/mysql
|
||||
|
||||
phpmyadmin:
|
||||
container_name: phpmyadmin
|
||||
|
@ -40,4 +38,4 @@ networks:
|
|||
|
||||
|
||||
volumes:
|
||||
mariadb:
|
||||
db_data:
|
|
@ -1,2 +0,0 @@
|
|||
MYSQL_USER=sskender
|
||||
MYSQL_PASSWORD=password
|
Loading…
Reference in New Issue