Restore database files without rebuilding
This commit is contained in:
parent
880b5423b7
commit
b28fe48eed
2
.env
2
.env
|
@ -4,4 +4,4 @@ MYSQL_ROOT_PASSWORD=roottoor
|
|||
# custom user
|
||||
MYSQL_USER=sskender
|
||||
MYSQL_PASSWORD=password123
|
||||
MYSQL_DATABASE=mydatabase
|
||||
MYSQL_DATABASE=mydatabase
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
mariadb/restore/*
|
||||
restore/*
|
||||
.DS_Store
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
version: '3.3'
|
||||
|
||||
|
||||
services:
|
||||
|
||||
mariadb:
|
||||
container_name: mariadb
|
||||
build:
|
||||
context: ./mariadb
|
||||
dockerfile: Dockerfile
|
||||
image: mariadb:latest
|
||||
env_file:
|
||||
- ".env"
|
||||
networks:
|
||||
|
@ -16,26 +12,24 @@ services:
|
|||
- "3306:3306"
|
||||
restart: always
|
||||
volumes:
|
||||
- ./restore:/docker-entrypoint-initdb.d:ro
|
||||
- db_data:/var/lib/mysql
|
||||
|
||||
phpmyadmin:
|
||||
container_name: phpmyadmin
|
||||
depends_on:
|
||||
- mariadb
|
||||
environment:
|
||||
- PMA_HOST=mariadb
|
||||
image: "phpmyadmin/phpmyadmin"
|
||||
image: phpmyadmin/phpmyadmin:latest
|
||||
networks:
|
||||
- intranet
|
||||
ports:
|
||||
- "8080:80"
|
||||
restart: always
|
||||
|
||||
|
||||
networks:
|
||||
intranet:
|
||||
driver: bridge
|
||||
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
db_data:
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
FROM mariadb:latest
|
||||
|
||||
COPY restore/* /docker-entrypoint-initdb.d/
|
Loading…
Reference in New Issue