- Install docker https://www.docker.com/get-started/
- Make sure these port are available 80, 81 and 3307
- install git [optional]
- install framework [optional]
- install mysql cli [optional]
How to install framework [optional]
mkdir -p /var/www/html/master
cd /var/www/html/master
git clone https://github.com/esoftplay/master.git ./
docker-compose up -d
mkdir -p /var/www/html/binary
cd /var/www/html/binary
git clone https://github.com/esoftplay/binary.git ./
mysql -u root --password='root' --port 3307 -h 127.0.0.1 -e 'DROP DATABASE IF EXISTS binary'
mysql -u root --password='root' --port 3307 -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS binary'
mysql -u root --password='root' --port 3307 -h 127.0.0.1 binary < database.sql
curl -s -X POST -F 'code='$(date|md5) http://localhost/tools/repair/change_salt > /dev/null
cd /var/www/html/binary
docker-compose up -d
How to create new project
- run master or edit
docker-compose.yaml
to unmark sql service
- create new folder and
cd
into this folder
- run command below
docker run -it -v $(pwd):/home/sites esoftplay/startbinary
mysql -u root --password='root' --port 3307 -h 127.0.0.1 -e 'DROP DATABASE IF EXISTS new_binary'
mysql -u root --password='root' --port 3307 -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS new_binary'
mysql -u root --password='root' --port 3307 -h 127.0.0.1 new_binary < database.sql
docker-compose up -d
curl -s -X POST -F 'code='$(date|md5) http://localhost/tools/repair/change_salt > /dev/null
- CD into the project folder
- run
docker-compose up -d
- open url http://localhost/
- edit the script if necessary
Learn more about the this framework