diff --git a/.env b/.env index 482abe1..b2c865b 100644 --- a/.env +++ b/.env @@ -4,4 +4,4 @@ MYSQL_ROOT_PASSWORD=roottoor # custom user MYSQL_USER=sskender MYSQL_PASSWORD=password123 -MYSQL_DATABASE=mydatabase \ No newline at end of file +MYSQL_DATABASE=mydatabase diff --git a/.gitignore b/.gitignore index e494ce9..f585b91 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -mariadb/restore/* \ No newline at end of file +restore/* +.DS_Store diff --git a/docker-compose.yml b/docker-compose.yml index 829970b..daa2b3c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: \ No newline at end of file + db_data: diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile deleted file mode 100644 index 6ab4f5b..0000000 --- a/mariadb/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM mariadb:latest - -COPY restore/* /docker-entrypoint-initdb.d/ \ No newline at end of file diff --git a/mariadb/restore/.gitkeep b/restore/.gitkeep similarity index 100% rename from mariadb/restore/.gitkeep rename to restore/.gitkeep