diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f9ab413 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM php:7.2.2-apache +RUN docker-php-ext-install mysqli pdo pdo_mysql diff --git a/README.md b/README.md index 932eaba..29fc5bd 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ existing colors. ## start To run the program execute: ```bash - docker-compose up -d + bash ./start.sh ``` ## test To run the tests execute: ```bash - test.sh + bash ./test.sh ``` diff --git a/docker-compose.yml b/docker-compose.yml index 4e668aa..cbf9b43 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: ports: - "9906:3306" web: - image: php:7.2.2-apache + build: . container_name: php_web depends_on: - db diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..2a67cfd --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker-compose up -d diff --git a/test.sh b/test.sh index 386ea52..239417d 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,2 @@ #!/bin/bash -(cd ./src && php -d memory_limit=128M vendor/bin/phpunit) +docker exec -ti php_web php -d memory_limit=128M vendor/bin/phpunit