diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bd83989 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM php:7.0-apache +COPY . /var/www/html/ +EXPOSE 80 diff --git a/README b/README.md similarity index 52% rename from README rename to README.md index 04c4fb3..01f41a7 100644 --- a/README +++ b/README.md @@ -1,10 +1,11 @@ -********************************************************** -* project: Open Source, Web-based IAT -* authors: Winter Mason (m@winteram.com) -* Steven Allon -* Pinar Ozturk -* source: https://github.com/winteram/IAT -********************************************************** +PROJECT INFO: +------------ + +- project: Open Source, Web-based IAT +- authors: Winter Mason (m@winteram.com) +- Steven Allon +- Pinar Ozturk +- source: https://github.com/winteram/IAT OVERVIEW: --------- @@ -52,9 +53,35 @@ OUTPUT: The output files are in the "output" folder within the template folder for the active IAT. The columns are as follows: -Trial # -Round # -Category Label -Category Index (which item within the category) -Errors -Reaction Time (in milliseconds) +* Trial # +* Round # +* Category Label +* Category Index (which item within the category) +* Errors +* Reaction Time (in milliseconds) + +Instruction to run locally: +--------------------------- + +Prerequisites: [git-scm](https://git-scm.com/), [docker](https://www.docker.com/products/docker). +Inside *nix terminal or windows command-line, cd into a directory of yours and: + +```bash +git clone https://github.com/pazams/IAT.git +cd IAT +docker build -t my-iat . +docker run -d -p 3000:80 --name my-running-iat my-iat +docker exec -it my-running-iat bash +# following 2 line inside docker image +sh setup.sh +exit +``` + +now, in your browser navgiate to these urls: +* http://localhost:3000/ +* http://localhost:3000/experimenter.php + +Note this setup is for local environment. + +For production environment, additional security measures are needed. It is recommended to deny direct access to some php files. Read more about it [here](http://stackoverflow.com/questions/2679524/block-direct-access-to-a-file-over-http-but-allow-php-script-access). +Also it is advised to remove `experimenter.php` in production, or add authentication layer.