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:
|
build:
|
||||||
context: ./mariadb
|
context: ./mariadb
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD=rootpassword
|
|
||||||
env_file:
|
env_file:
|
||||||
- mariadb.env
|
- ".env"
|
||||||
networks:
|
networks:
|
||||||
- intranet
|
- intranet
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- mariadb:/var/lib/mysql
|
- db_data:/var/lib/mysql
|
||||||
|
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
container_name: phpmyadmin
|
container_name: phpmyadmin
|
||||||
|
@ -40,4 +38,4 @@ networks:
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mariadb:
|
db_data:
|
|
@ -1,2 +0,0 @@
|
||||||
MYSQL_USER=sskender
|
|
||||||
MYSQL_PASSWORD=password
|
|
Loading…
Reference in New Issue