Development Environment using LEMP and php 7 and persistent database
First time: Put all the files on the root of the project and execute
docker-compose up -d --build
Second time onwards: execute docker-compose start to start the containers, and docker-compose stop to stop them.
Access your development website at http://localhost/
Access phpmyadmin at http://localhost:8080
You can use the helper bash script located in docker/scripts/ to send a sql dump to the server, let's see how:
- Name your dump as schema.sql and compress it with
tar -zcvf schema.tar.gz schema.tar - Put the schema.tar.gz in the same folder as the helper script
- Use
docker psto find out your mysql:latest container ID - Execute the script providing the ID
./import_database.sh 0934b6a8b562
thanks to osteel for making a great tutorial on docker