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
|
# custom user
|
||||||
MYSQL_USER=sskender
|
MYSQL_USER=sskender
|
||||||
MYSQL_PASSWORD=password123
|
MYSQL_PASSWORD=password123
|
||||||
MYSQL_DATABASE=mydatabase
|
MYSQL_DATABASE=mydatabase
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
mariadb/restore/*
|
restore/*
|
||||||
|
.DS_Store
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
version: '3.3'
|
version: '3.3'
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
mariadb:
|
mariadb:
|
||||||
container_name: mariadb
|
container_name: mariadb
|
||||||
build:
|
image: mariadb:latest
|
||||||
context: ./mariadb
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
env_file:
|
env_file:
|
||||||
- ".env"
|
- ".env"
|
||||||
networks:
|
networks:
|
||||||
|
@ -16,26 +12,24 @@ services:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./restore:/docker-entrypoint-initdb.d:ro
|
||||||
- db_data:/var/lib/mysql
|
- db_data:/var/lib/mysql
|
||||||
|
|
||||||
phpmyadmin:
|
phpmyadmin:
|
||||||
container_name: phpmyadmin
|
container_name: phpmyadmin
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
environment:
|
environment:
|
||||||
- PMA_HOST=mariadb
|
- PMA_HOST=mariadb
|
||||||
image: "phpmyadmin/phpmyadmin"
|
image: phpmyadmin/phpmyadmin:latest
|
||||||
networks:
|
networks:
|
||||||
- intranet
|
- intranet
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
intranet:
|
intranet:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_data:
|
db_data:
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM mariadb:latest
|
|
||||||
|
|
||||||
COPY restore/* /docker-entrypoint-initdb.d/
|
|
Loading…
Reference in New Issue