Skip to content

Commit

Permalink
Merge pull request #88 from openeuropa/OPENEUROPA-1322
Browse files Browse the repository at this point in the history
OPENEUROPA-1322: Use the proper Docker way of overriding docker-composer.yml file.
  • Loading branch information
drupol authored Nov 23, 2018
2 parents ff9f5d0 + 1fe4fe3 commit 8ed40cf
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 12 deletions.
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## OPENEUROPA-[Insert ticket number here]

### Description

[Insert description here]

### Change log

- Added:
- Changed:
- Deprecated:
- Removed:
- Fixed:
- Security:

### Commands

```sh
[Insert commands here]

```

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ behat.yml
*.tar.gz
/.idea/
runner.yml
docker-compose.yml
docker-compose.*.yml
63 changes: 52 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,67 @@ Quick references:

Install it with [Composer](https://getcomposer.org):

```
$ composer require openeuropa/task-runner
```bash
composer require openeuropa/task-runner
```

After installation run `./vendor/bin/run` for a list of available commands.

### Using Docker Compose

The setup procedure can be simplified by using Docker Compose.
Alternatively, you can build a development site using [Docker](https://www.docker.com/get-docker) and
[Docker Compose](https://docs.docker.com/compose/) with the provided configuration.

Docker provides the necessary services and tools to get the tests running, regardless of your local host configuration.

Requirements:
#### Requirements:

- [Docker](https://www.docker.com/get-docker)
- [Docker-compose](https://docs.docker.com/compose/)
- [Docker Compose](https://docs.docker.com/compose/)

#### Configuration

Copy docker-compose.yml.dist into docker-compose.yml.
By default, Docker Compose reads two files, a `docker-compose.yml` and an optional `docker-compose.override.yml` file.
By convention, the `docker-compose.yml` contains your base configuration and it's provided by default.
The override file, as its name implies, can contain configuration overrides for existing services or entirely new
services.
If a service is defined in both files, Docker Compose merges the configurations.

You can make any alterations you need for your local Docker setup. However, the defaults should be enough to set the project up.
Find more information on Docker Compose extension mechanism on [the official Docker Compose documentation](https://docs.docker.com/compose/extends/).

Run:
#### Usage

To start, run:

```bash
docker-compose up
```
$ docker-compose up -d

It's advised to not daemonize `docker-compose` so you can turn it off (`CTRL+C`) quickly when you're done working.
However, if you'd like to daemonize it, you have to add the flag `-d`:

```bash
docker-compose up -d
```

Then:

```bash
docker-compose exec web composer install
```

#### Running the tests

To run the grumphp checks:

```bash
docker-compose exec web ./vendor/bin/grumphp run
```
$ docker-compose exec web composer install

To run the phpunit tests:

```bash
docker-compose exec web ./vendor/bin/phpunit
```

## Configuration
Expand Down Expand Up @@ -167,7 +199,7 @@ After doing that remember to refresh your local autoloader by running `composer

You can now access your new commands via the Task Runner main executable:

```
```bash
$ ./vendor/bin/run
OpenEuropa Task Runner
Expand All @@ -184,3 +216,12 @@ register them at startup.
Even if not mandatory it is recommended for your command classes to extend `OpenEuropa\TaskRunner\Commands\AbstractCommands`.

For more details on how to expose custom commands please refer to the main [Robo documentation](http://robo.li/getting-started).

## Contributing

Please read [the full documentation](https://github.com/openeuropa/openeuropa) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the available versions, see the [tags on this repository](https://github.com/openeuropa/task-runner/tags).

File renamed without changes.

0 comments on commit 8ed40cf

Please sign in to comment.