Permalink
Browse files

Docker-Compose: New setup with database dump

  • Loading branch information...
andygrunwald committed May 1, 2018
1 parent c1b2c82 commit bdce457f148eff15642a31d99cdffce533c76e80
Showing with 29 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +20 −0 README.md
  3. +6 −0 docker-compose.dump.yml
@@ -1,6 +1,9 @@
# LanSuite configuration
/inc/base/config.php
# Database dump
database-dump.sql
# Installed by vendors
bin/phpunit
@@ -46,6 +46,26 @@ After everything started you should be able to visit http://`<Your-Docker-IP>`:8
*Warning*: This Docker setup should not be used for production. It contains a debugging setup like [Xdebug](https://xdebug.org/).
### Docker with a database dump
If you have already a running website based on LanSuite, you can also start a docker based setup with a copy of your database.
It comes handy to test the new features with your dataset.
This guide assumes that you have already a copy of your database in a single SQL file.
If you don't have one, you can create one with tools like [mysqldump](https://dev.mysql.com/doc/refman/5.7/en/mysqldump-sql-format.html), [PHPMyAdmin](https://www.phpmyadmin.net/) or ask your hoster for a copy.
Move your database dump into the root folder of LanSuite and name it `database-dump.sql`:
```
$ mv /your/db/dump.sql /lansuite/copy/database-dump.sql
```
After this, you can start the [docker-compose](https://docs.docker.com/compose/) setup via
```
$ docker-compose -f docker-compose.yml -f docker-compose.dump.yml up
```
### Configuration file
An example configuration file looks like:
@@ -0,0 +1,6 @@
version: '3'
services:
mysql:
volumes:
- ./database-dump.sql:/docker-entrypoint-initdb.d/dump.sql

0 comments on commit bdce457

Please sign in to comment.