Skip to content

Commit

Permalink
Merge pull request #45 from alexmanno/update-docker-commands
Browse files Browse the repository at this point in the history
Use Makefile instead of bash scripts
  • Loading branch information
Algatux authored Dec 16, 2017
2 parents 0eb9181 + 7a947c4 commit 77e9572
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@
/.styleci.yml export-ignore
/phpunit.xml.dist export-ignore
/docker-compose.yml export-ignore
/setup.sh export-ignore
/start.sh export-ignore
/test.sh export-ignore
/Makefile export-ignore
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.PHONY: up setup start test

up: docker-compose.yml
docker-compose up -d --force-recreate

setup: docker-compose.yml composer.json
docker-compose run --rm php-cli composer install

start: up
docker exec -ti mb_php bash

test: docker-compose.yml phpunit.xml.dist
docker-compose run --rm php-cli bash -c "sleep 3 && bin/phpunit -c phpunit.xml.dist"
6 changes: 3 additions & 3 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ If you like docker, this repository is provided with a dev environment with some
All you need is docker and docker-compose installed on your system.

```
./setup.sh # will build the needed containers and setup the project
make setup # will build the needed containers and setup the project
```
```
./start.sh # will start the needed containers and put you inside the php-cli container
make start # will start the needed containers and put you inside the php-cli container
```
```
./test.sh # will launch the test suite
make test # will launch the test suite
```
Note: All these scripts are meant to be used outside the containers.
5 changes: 0 additions & 5 deletions setup.sh

This file was deleted.

4 changes: 0 additions & 4 deletions start.sh

This file was deleted.

4 changes: 0 additions & 4 deletions test.sh

This file was deleted.

0 comments on commit 77e9572

Please sign in to comment.