Restore database files without rebuilding

This commit is contained in:
Sven Skender 2022-05-24 00:45:53 +02:00
parent 880b5423b7
commit b28fe48eed
No known key found for this signature in database
GPG Key ID: FF799DA1421B0C69
5 changed files with 7 additions and 15 deletions

2
.env
View File

@ -4,4 +4,4 @@ MYSQL_ROOT_PASSWORD=roottoor
# custom user
MYSQL_USER=sskender
MYSQL_PASSWORD=password123
MYSQL_DATABASE=mydatabase
MYSQL_DATABASE=mydatabase

3
.gitignore vendored
View File

@ -1 +1,2 @@
mariadb/restore/*
restore/*
.DS_Store

View File

@ -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:

View File

@ -1,3 +0,0 @@
FROM mariadb:latest
COPY restore/* /docker-entrypoint-initdb.d/