Skip to content

Commit

Permalink
Updated vendors for 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Cezary Olejarczyk committed Nov 16, 2017
1 parent 0648dc1 commit 5bcc682
Show file tree
Hide file tree
Showing 158 changed files with 7,715 additions and 4,929 deletions.
29 changes: 29 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,32 @@ php-7.0:
- bin/console doctrine:schema:validate --env=test --skip-sync
- vendor/phpunit/phpunit/phpunit
- bin/php-cs-fixer fix --dry-run --diff src

php-7.1:
image: tetraweb/php:7.1
stage: test
services:
- elasticsearch:2.2
- postgres:9
script:
- echo "memory_limit = 512M" > /usr/local/etc/php/conf.d/memory.ini
- cd backend
- mkdir app/var
- mkdir app/var/jwt
- openssl genrsa -out app/var/jwt/private.pem 4096
- openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem
- docker-php-ext-enable zip pdo pgsql pdo_pgsql mbstring intl bcmath
- "sed -i 's/database_host: .*/database_host: postgres/g' app/config/parameters.yml.dist"
- "sed -i 's/elastica_host: .*/elastica_host: elasticsearch/g' app/config/parameters.yml.dist"
- composer self-update
- composer install
- bin/console oloy:user:projections:index:create --drop-old
- bin/console doctrine:schema:update --env=test -n --force
- bin/console broadway:event-store:schema:drop
- bin/console broadway:event-store:schema:init
- bin/console doctrine:fixtures:load --env=test -n
- bin/console assets:install --env=test
- bin/console security:check
- bin/console doctrine:schema:validate --env=test --skip-sync
- vendor/phpunit/phpunit/phpunit
- bin/php-cs-fixer fix --dry-run --diff src
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ services:
- docker

before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin

script:
- docker-compose -f docker-compose.yml -f docker-compose.test.yml run backend
- cd docker && docker-compose -f docker-compose.yml -f docker-compose.test.yml run php
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2017-11-016
### Added
- Kubernetes support
### Changed
- Docker files
- Frontend migration from Gulp to the Webpack
- Migration from Nodejs server to the Nginx

## [1.4.0] - 2017-11-07
### Added
- CLI command to restore read model using event store
### Fixed
- AC/POSC fixed transaction id
- AC/POSC show points for each transaction
- AC clear fields after changing event type
- POSC fixed missing days from last order
- CC fixed cancel button

## [1.3.1] - 2017-10-23
### Added
- Added change log file
Expand Down
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ There is variety of applications for Open Loyalty. Based on it you can build loy

This project has full support for running in [Docker](https://www.docker.com/>).

Execute bellow command to run application:
Go to the docker directory:

```
docker-compose up
cd docker
```

or, if you are developer and want to attach source code then:
Execute bellow command to run application:

```
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
docker-compose up
```

Then use another command to setup database, Elasticsearch and load some demo data:

```
docker-compose exec backend phing setup
docker-compose exec php phing setup
```

If you find any problems using docker (for example on Windows environments) please try our Vagrant recipe.
Expand All @@ -52,31 +52,41 @@ Then, please execute following commands:
```
vagrant up
vagrant ssh
cd ol
cd ol/docker
docker-compose up -d
docker-compose exec backend phing demo
docker-compose exec open_loyalty_backend phing demo
```


That's all. Now you can go to admin panel [127.0.0.1:8182](http://127.0.0.1:8182).
Default login is **admin** and password **open**. You can also go to customer panel [127.0.0.1:8183](http://127.0.0.1:8183).

If you are developer and want to attach source code then:

```
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
```

## Url access
After starting Open Loyalty it's exposes services under followig URLs:
After starting Open Loyalty it's exposes services under following URLs:

* http://localhost:8182 - the administration panel,
* http://localhost:8183 - the customer panel,
* http://localhost:8184 - the merchant panel,
* http://localhost:8181 - RESTful API port
* http://localhost:8181/doc - swagger-like API doc

If you are developer and want to attach source code then:

```
cd docker/base
./build_dev.sh
cd ..
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
```

## Url access for developer
After starting Open Loyalty in developer mode it's exposes services under slightly different URLs:

* http://localhost:8081/admin - the administration panel,
* http://localhost:8081/client - the customer panel,
* http://localhost:8081/pos - the merchant panel,
* http://localhost:8181 - RESTful API port
* http://localhost:8181/app_dev.php/doc - swagger-like API doc

## Generate JWT keys

Expand Down
4 changes: 3 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
app/var/jwt/
app/var/jwt/
bin/symfony_requirements
web/config.php
48 changes: 0 additions & 48 deletions backend/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions backend/app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ doctrine:
default_connection: default
connections:
default:
server_version: "%database_version%"
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
Expand Down
1 change: 1 addition & 0 deletions backend/app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parameters:
database_user: openloyalty
database_password: openloyalty
database_driver: pdo_pgsql
database_version: 9
elastica_host: elk
elastica_port: 9200
# You should uncomment this if you want use pdo_sqlite
Expand Down
2 changes: 1 addition & 1 deletion backend/bin/symfony_requirements
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php

require_once dirname(__FILE__).'/./SymfonyRequirements.php';
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';

$lineSize = 70;
$symfonyRequirements = new SymfonyRequirements();
Expand Down
10 changes: 5 additions & 5 deletions backend/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<exec command="bin/console broadway:event-store:schema:init -n" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:fixtures:load --env=test -n" checkreturn="true" passthru="true"/>
<exec command="bin/console oloy:segment:recreate -vv" checkreturn="true" passthru="true"/>
<exec command="bin/console security:check" checkreturn="true" passthru="true"/>
<exec command="bin/console --env=dev security:check" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:schema:validate --env=test --skip-sync" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit vendor/divante-ltd/open-loyalty-framework/" checkreturn="true" passthru="true"/>
<exec command="bin/php-cs-fixer fix --dry-run --diff src" checkreturn="true" passthru="true"/>
</target>
<target name="setup" description="Setup everything" depends="generate-jwt-keys">
Expand All @@ -31,17 +31,17 @@
<exec command="bin/console broadway:event-store:schema:drop -n --env=test" checkreturn="true" passthru="true"/>
<exec command="bin/console broadway:event-store:schema:init -n --env=test" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:fixtures:load -n --env=test" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit vendor/divante-ltd/open-loyalty-framework/" checkreturn="true" passthru="true"/>
</target>
<target name="test-security" description="Setup everything and run tests">
<exec command="bin/console oloy:user:projections:index:create --drop-old -n --env=test" checkreturn="true" passthru="true"/>
<exec command="bin/console broadway:event-store:schema:drop -n --env=test" checkreturn="true" passthru="true"/>
<exec command="bin/console broadway:event-store:schema:init -n --env=test" checkreturn="true" passthru="true"/>
<exec command="bin/console doctrine:fixtures:load -n --env=test" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit --stop-on-failure --testsuite Security" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit --stop-on-failure --testsuite Security vendor/divante-ltd/open-loyalty-framework/" checkreturn="true" passthru="true"/>
</target>
<target name="test-domain" description="Setup everything and run tests">
<exec command="vendor/phpunit/phpunit/phpunit --stop-on-failure --testsuite Domain" checkreturn="true" passthru="true"/>
<exec command="vendor/phpunit/phpunit/phpunit --stop-on-failure --testsuite Domain vendor/divante-ltd/open-loyalty-framework/" checkreturn="true" passthru="true"/>
</target>

<target name="demo" description="Setup for demo purposes" depends="generate-jwt-keys">
Expand Down
6 changes: 3 additions & 3 deletions backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"require": {
"php": ">=5.5.9",
"php": ">=7.0",
"symfony/symfony": "3.2.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
Expand All @@ -43,7 +43,7 @@
"knplabs/knp-gaufrette-bundle": "^0.3.0",
"beberlei/DoctrineExtensions": "^1.0",
"sensio/generator-bundle": "^3.0",
"divante-ltd/open-loyalty-framework": "1.4.*"
"divante-ltd/open-loyalty-framework": "^2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.0",
Expand All @@ -69,7 +69,7 @@
},
"config": {
"platform": {
"php": "5.6"
"php": "7.0"
},
"bin-dir": "var/bin"
},
Expand Down
Loading

0 comments on commit 5bcc682

Please sign in to comment.