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

3
.gitignore vendored
View File

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

View File

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

View File

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