Compare commits
7 commits
Author | SHA1 | Date | |
---|---|---|---|
|
72d322ba80 | ||
|
5db8e1c9ec | ||
|
f42cf56b0c | ||
|
b710d7fa7d | ||
|
6c9bfbc48b | ||
|
5ebe52909e | ||
|
e499a3c824 |
4 changed files with 698 additions and 470 deletions
40
.travis.yml
40
.travis.yml
|
@ -1,29 +1,33 @@
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
dist: trusty
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
sudo: false
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.composer/cache/files
|
||||||
|
|
||||||
php:
|
env:
|
||||||
- 7.0
|
- DATABASE_URL=mysql://lbry:lbry@localhost:15500/chainquery
|
||||||
- 7.1
|
- DATABASE_TEST_URL=mysql://lbry:lbry@localhost:15500/chainquery
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
include:
|
|
||||||
- php: 7.0
|
|
||||||
env: PHPCS=1
|
|
||||||
|
|
||||||
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
|
- DATABASE_TEST_URL=mysql://lbry:lbry@localhost:15500/chainquery 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
|
||||||
|
|
1077
composer.lock
generated
1077
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -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…
Add table
Reference in a new issue