Skip to content

Commit

Permalink
Merge pull request #308 from AntonShevchuk/master
Browse files Browse the repository at this point in the history
Updated Docker Compose version to 3
  • Loading branch information
Anton authored Oct 17, 2017
2 parents 1140ad4 + a9aa8c7 commit 308159e
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 38 deletions.
25 changes: 14 additions & 11 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Docker
Docker
======

## Setup containers

All environment configuration located in `docker` folder.
1. Create `docker-compose.yml` from `docker-compose.yml.dist` and configure up to you
Expand Down Expand Up @@ -28,39 +31,39 @@ $ docker exec -ti bluz_php bluzman db:migrate
$ docker exec -ti bluz_php bluzman db:seed:run
```

### Frequently Asked Question(s)
## Frequently Asked Question(s)

remove bluz containers
Show containers for bluz
```
$ docker-compose -p bluz -f docker/docker-compose.yml rm
$ docker-compose -p bluz -f docker/docker-compose.yml ps
```

stop bluz containers
Stop bluz containers
```
$ docker-compose -p bluz -f docker/docker-compose.yml stop
```

show containers for bluz
Remove bluz containers
```
$ docker-compose -p bluz -f docker/docker-compose.yml ps
$ docker-compose -p bluz -f docker/docker-compose.yml rm
```

run command inside container
Run command inside container
```
$ docker exec -ti %container_name% %bash_command%
```

run database migration
Run database migration
```
$ docker exec -ti bluz_php bluzman db:migrate
```

run database seed
Run database seed
```
$ docker exec -ti bluz_php bluzman db:seed:run
```

run tests
Run tests
```
$ docker exec -ti bluz_php bluzman test
```
28 changes: 9 additions & 19 deletions docker/docker-compose.yml.dist
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
version: '2'
version: '3'
services:
code:
image: debian:jessie
volumes:
- ../:/var/www

nginx:
build: nginx
container_name: bluz_nginx
volumes_from:
- code
volumes:
- ..:/var/www
ports:
- "81:80"
depends_on:
- php

php:
build: php
container_name: bluz_php
volumes_from:
- code
volumes:
- ..:/var/www
depends_on:
- mysql
environment:
Expand All @@ -28,18 +22,14 @@ services:
- mysql/db.env
- php/xdebug.env
- php/bluz.env

mysql:
build: mysql
container_name: bluz_mysql
volumes_from:
- mysqldata
volumes:
- db:/var/lib/mysql
ports:
- "3307:3306"
env_file:
- mysql/db.env

mysqldata:
image: debian:jessie
volumes:
- /var/lib/mysql
volumes:
db:
1 change: 0 additions & 1 deletion docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*

2 changes: 1 addition & 1 deletion docker/php/bluz.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BLUZ_ENV=production
BLUZ_ENV=dev
BLUZ_LOG=true
BLUZ_DEBUG=true

Expand Down
1 change: 0 additions & 1 deletion public/js/bluz.ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ define(['jquery', 'bluz', 'bluz.modal', 'bluz.notify'], function ($, bluz, modal
})
.ajaxSuccess(function (event, jqXHR, options) {
try {
console.log(arguments);
let $element = $(options.context);
$element.trigger('success.bluz.ajax', arguments);

Expand Down
15 changes: 13 additions & 2 deletions tests/_support/_generated/AcceptanceTesterActions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //[STAMP] 238fc3934bde52170266730ceee7edb4
<?php //[STAMP] 063193f43efa859f36c3baeff8d04425
namespace _generated;

// This class was automatically generated by build task
Expand Down Expand Up @@ -131,6 +131,17 @@ public function executeInGuzzle($function) {
* ?>
* ```
*
* To use special chars in Header Key use HTML Character Entities:
* Example:
* Header with underscore - 'Client_Id'
* should be represented as - 'Client&#x0005F;Id' or 'Client&#95;Id'
*
* ```php
* <?php
* $I->haveHttpHeader('Client&#95;Id', 'Codeception');
* ?>
* ```
*
* @param string $name the name of the request header
* @param string $value the value to set it to for subsequent
* requests
Expand Down Expand Up @@ -779,7 +790,7 @@ public function dontSeeCurrentUrlMatches($uri) {
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Executes the given regular expression against the current URI and returns the first match.
* Executes the given regular expression against the current URI and returns the first capturing group.
* If no parameters are provided, the full URI is returned.
*
* ``` php
Expand Down
28 changes: 27 additions & 1 deletion tests/_support/_generated/ApiTesterActions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //[STAMP] 71b28b7fa8a60e1fc5ebe049a6f23fbc
<?php //[STAMP] 7418156a57d9a5b26e024433798988bc
namespace _generated;

// This class was automatically generated by build task
Expand Down Expand Up @@ -242,6 +242,32 @@ public function amBearerAuthenticated($accessToken) {
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
* Adds NTLM authentication via username/password.
* Requires client to be Guzzle >=6.3.0
* Out of scope for functional modules.
*
* Example:
* ```php
* <?php
* $I->amNTLMAuthenticated('jon_snow', 'targaryen');
* ?>
* ```
*
* @param $username
* @param $password
* @throws ModuleException
* @part json
* @part xml
* @see \Codeception\Module\REST::amNTLMAuthenticated()
*/
public function amNTLMAuthenticated($username, $password) {
return $this->getScenario()->runStep(new \Codeception\Step\Condition('amNTLMAuthenticated', func_get_args()));
}


/**
* [!] Method is generated. Documentation taken from corresponding module.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/_generated/FunctionalTesterActions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //[STAMP] 1c60ce9a905539f6ec4fc78afd3293b9
<?php //[STAMP] d0f4326bd128ed1df24a0068c8307b16
namespace _generated;

// This class was automatically generated by build task
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/_generated/UnitTesterActions.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php //[STAMP] 4dd984354cb1b50e3bb82d76461ebbc0
<?php //[STAMP] 6ba439780bb7c53ee2e7429f4f23b2e0
namespace _generated;

// This class was automatically generated by build task
Expand Down

0 comments on commit 308159e

Please sign in to comment.