Сервисы для Point.im https://point.skobk.in/
Find a file
2019-01-19 02:25:36 +03:00
app DB schema, entities and factories small refactoring. 2017-11-06 05:36:32 +03:00
src composer update knplabs/knp-paginator-bundle (v2.6.0 => v2.8.0). KNP Paginator deprecations removed. 2019-01-19 02:20:58 +03:00
tests/Skobkin/PointToolsBundle UserControllerTest fix. 2017-11-04 23:29:32 +03:00
web Public feed implemented. 2017-11-05 00:30:32 +03:00
.gitignore Ignore .idea directory 2015-03-29 17:35:44 +03:00
composer.json composer update symfony/symfony (from 3.4.x-dev to 3.4.21). 2019-01-19 02:14:28 +03:00
composer.lock composer update symfony/polyfill-mbstring (v1.6.0 => v1.10.0), symfony/polyfill-php70 (v1.6.0 => v1.10.0), symfony/polyfill-util (v1.6.0 => v1.10.0), symfony/polyfill-php56 (v1.6.0 => v1.10.0), symfony/polyfill-intl-icu (v1.6.0 => v1.10.0), symfony/polyfill-apcu (v1.6.0 => v1.10.0), symfony/monolog-bundle (v3.1.1 => v3.3.1), symfony/phpunit-bridge (v3.3.10 => v3.4.21). 2019-01-19 02:25:36 +03:00
LICENSE Add LICENSE 2015-03-27 23:13:42 +03:00
phpunit.xml.dist phpunit.xml.dist: convertNoticesToExceptions="false" 2017-11-05 05:08:47 +03:00
README.md crontab added for future deployment integration. 2017-01-18 04:34:24 +03:00

Codeship Status for skobkin/point-tools Scrutinizer Code Quality codecov Total Downloads License

Point Tools

Point Tools is a service which provides additional features for Point.im microblog users.

Installation

Application setup is quite simple:

Getting the source code

Via Git

git clone https://skobkin@bitbucket.org/skobkin/point-tools.git
cd point-tools

Via Composer

composer create-project skobkin/point-tools -s dev
cd point-tools

Setting file access privileges

Set up appropriate write privileges for app/cache and app/logs.

Installing dependencies (not needed after installation via Composer)

# In developer environment:
composer install
# In production environment
composer install --no-dev --optimize-autoloader

After dependencies installation you will be asked for database credentials of PostgreSQL database and some other application parameters.

Database initialization

php app/console doctrine:migrations:migrate

Web assets installation

php app/console assets:install web --symlink

Adding CRON jobs

crontab -e

You can use following jobs as an example:

# point.skobk.in
*/10 * * * * /usr/bin/php /path/to/point-tools/app/console point:update:subscriptions --env=prod
0 0 * * * /usr/bin/php /path/to/point-tools/app/console point:update:subscriptions --all-users --env=prod

See app/crontab for more advanced usage.

Setting Telegram webhook (to enable bot)

php app/console telegram:webhook set

Removing Telegram webhook

php app/console telegram:webhook delete

Running tests

Configure environment variables

export SYMFONY__TEST_DATABASE_USER=some_database_user
export SYMFONY__TEST_DATABASE_PASSWORD=some_database_password
export SYMFONY__TEST_DATABASE_NAME=some_database_name
export SYMFONY__TEST_DATABASE_PORT=postgresql_port
export SYMFONY_ENV=test

Load fixtures (if needed)

php app/console doctrine:fixtures:load --no-interaction

Run tests

phpunit -c app/