....
This commit is contained in:
parent
5ebe52909e
commit
6c9bfbc48b
3 changed files with 74 additions and 12 deletions
35
.travis.yml
35
.travis.yml
|
@ -1,20 +1,35 @@
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
dist: trusty
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
php: 7.2
|
php: 7.2
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.composer/cache/files
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DATABASE_URL=lbry:lbry@tcp(localhost:15500)/chainquery
|
||||||
|
- DATABASE_TEST_URL=lbry:lbry@tcp(localhost:15500)/chainquery
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:~2.1; fi
|
- composer require cakephp/cakephp-codesniffer:~2.1
|
||||||
- if [[ $PHPCS != 1 ]]; then composer install; fi
|
- composer install
|
||||||
- if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"^5.7|^6.0"; fi
|
- composer require phpunit/phpunit:"^5.7|^6.0"
|
||||||
- if [[ $PHPCS != 1 ]]; then composer run-script post-install-cmd --no-interaction; fi
|
- composer run-script post-install-cmd --no-interaction
|
||||||
|
- echo 'lbrycrdurl="rpc://lbry:lbry@lbrycrd:29245"' > chainqueryconfig.toml
|
||||||
|
- echo 'mysqldsn="lbry:lbry@tcp(mysql:3306)/chainquery"' >> chainqueryconfig.toml
|
||||||
|
- echo 'apimysqldsn="lbry:lbry@tcp(mysql:3306)/chainquery"' >> chainqueryconfig.toml
|
||||||
|
- echo 'blockchainname="lbrycrd_regtest"' >> chainqueryconfig.toml
|
||||||
|
- docker-compose up -d
|
||||||
|
- sleep 5
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [[ $PHPCS != 1 ]]; then vendor/bin/phpunit; fi
|
- vendor/bin/phpunit
|
||||||
- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot; fi
|
- vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
@ -222,8 +222,8 @@ Type::build('timestamp')
|
||||||
* Debug Kit should not be installed on a production system
|
* Debug Kit should not be installed on a production system
|
||||||
*/
|
*/
|
||||||
if (Configure::read('debug')) {
|
if (Configure::read('debug')) {
|
||||||
//Plugin::load('DebugKit', ['bootstrap' => true]);
|
Plugin::load('DebugKit', ['bootstrap' => true]);
|
||||||
Application::addPlugin('DebugKit', ['bootstrap' => true]);
|
//Application::addPlugin('DebugKit', ['bootstrap' => true]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Configure::load('lbry','lbry.default');
|
Configure::load('lbry','lbry.default');
|
||||||
|
|
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
version: "3.5"
|
||||||
|
services:
|
||||||
|
#############
|
||||||
|
## Lbrycrd ##
|
||||||
|
#############
|
||||||
|
lbrycrd:
|
||||||
|
image: lbry/lbrycrd:v0.17.3.2-deprecatedrpc
|
||||||
|
restart: "no"
|
||||||
|
ports:
|
||||||
|
- "15201:29246"
|
||||||
|
- "15200:29245"
|
||||||
|
expose:
|
||||||
|
- "29246"
|
||||||
|
- "29245"
|
||||||
|
## host volumes for persistent data such as wallet private keys.
|
||||||
|
volumes:
|
||||||
|
- "./persist:/data"
|
||||||
|
environment:
|
||||||
|
- RUN_MODE=regtest
|
||||||
|
###########
|
||||||
|
## MySQL ##
|
||||||
|
###########
|
||||||
|
mysql:
|
||||||
|
image: mysql/mysql-server:5.7.27
|
||||||
|
restart: "no"
|
||||||
|
ports:
|
||||||
|
- "15500:3306"
|
||||||
|
environment:
|
||||||
|
- MYSQL_ALLOW_EMPTY_PASSWORD=true
|
||||||
|
- MYSQL_DATABASE=chainquery
|
||||||
|
- MYSQL_USER=lbry
|
||||||
|
- MYSQL_PASSWORD=lbry
|
||||||
|
- MYSQL_LOG_CONSOLE=true
|
||||||
|
################
|
||||||
|
## Chainquery ##
|
||||||
|
################
|
||||||
|
chainquery:
|
||||||
|
image: lbry/chainquery:v2.0.8
|
||||||
|
restart: "no"
|
||||||
|
ports:
|
||||||
|
- 6300:6300
|
||||||
|
depends_on:
|
||||||
|
- lbrycrd
|
||||||
|
- mysql
|
||||||
|
volumes:
|
||||||
|
- ./chainqueryconfig.toml:/etc/lbry/chainqueryconfig.toml
|
||||||
|
entrypoint: wait-for-it -t 0 lbrycrd:29245 -- wait-for-it -t 0 mysql:3306 -- start
|
Loading…
Reference in a new issue