A small sample PHP code that retrieves some news from SQL. Easy to use as a sample app during learning cloud/docker solutions.
Never use in production, this a sample code only.
- Create a MySQL database with a name: "test"
- Edit the config.php file: servername, username, password, database name.
- Import create.sql to MySQL
- Copy php/src folder to a web server folder (eg. /var/www/html) and run index.php
- Admin is available at "localhost/admin" - user: admin, password: admin
- Open terminal in root folder of the project
- run "docker-compose build" to create the containers
- run "docker-compose up -d" to run the containers
- Open a browser with URL: "localhost" (If you get a Warning message, wait while MySQL starts.)
- Admin is available at "localhost/admin" - user: admin, password: admin