Template for a PHP and MySQL stack. This is made for competition purposes only. A /mysql/init.sql is provided to startup the database with data. The data is wiped once the instance is closed.
- In
docker-compose.yml, replace all thetemplateto the name of your app. Replace therootdatabase password to your own password. - In
/mysql/init.sql, replace thetemplatedatabase to your database. - In
/src/index.php, replace therootpassword to the database password.
All you need is Docker. Run the following command in the root of this repository:
docker-compose up
A frontend instance will be created at http://localhost/. Make sure to wait for a message from the database instance stating port: 3306 is open.
The app can be closed using CTRL+C. The app can be completely closed with the following command in the root of this repository:
docker-compose down