From c2fe35a8a56559b503443a446d816b051998d946 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sat, 14 Jul 2018 10:29:32 +0200 Subject: [PATCH] Added docker --- README.md | 11 +++++++++-- docker-compose.yml | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 34c7742..189c7a4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # coding-challenge-online-shop Coding challenge for a online shop -# requirements +## tasks +### requirements 1. Create a web application with PHP which works like a really small online shop. 2. Create a database with at least 20 products automatically per script. 3. Create a product listing which display all products from the database. The following information are required: @@ -19,10 +20,16 @@ method2. 10. Store the order at the database. 11. Add a color filter to the product list. The user should be able to filter the listing with the existing colors. -# specifications +### specifications - Please use PHP, MySQL and HTML. You can also use CSS, JavaScript, Bootstrap and jQuery. - Save your code online at github. - Please use an autoloader and namespaces. - Don’t use a ready to go framework. Build the application from the scratch. - Use transactions if it makes sense. - Please cover your code with unit tests. + +## start +To run the program execute +```bash + docker-compose up -d +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4e668aa --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: '3' + +services: + db: + image: mysql:5.7 + environment: + MYSQL_ROOT_PASSWORD: my_secret_pw_shh + MYSQL_DATABASE: test_db + MYSQL_USER: devuser + MYSQL_PASSWORD: devpass + ports: + - "9906:3306" + web: + image: php:7.2.2-apache + container_name: php_web + depends_on: + - db + volumes: + - ./src/:/var/www/html/ + ports: + - "8100:80" + stdin_open: true + tty: true