LongLog web-application.
Based on Yii2 advanced template
Clone this repo (you can get future updates by git pull
)
git clone https://github.com/demisang/longlog.git
Clone this project via composer (only manual updates)
composer create-project --prefer-dist longlog/web longlog
cp longlog/vagrant/config/vagrant-local.example.yml longlog/vagrant/config/vagrant-local.yml
Generate github token here https://github.com/settings/tokens/new
Paste token to file: longlog/vagrant/config/vagrant-local.yml
vagrant up
If you need Grunt support:
vagrant ssh
cd /app
./install-grunt.sh
source ~/.profile
# Run all grunt tasks (sass and favicons)
grunt
# Process scss to css
grunt sass
# Generate favicons
grunt favicons
# Watching scss file changes and run "sass" task.
# Try to edit files in /frontend/resourses/scss/*.scss and
# you changes immediately applied to /frontend/web/css/style.css
grunt watch
Complete!
Frontend URL: http://longlog.dev
Backend URL: http://admin.longlog.dev
Api URL: http://api.longlog.dev
- Register new reCAPTCHA API keys and replace it in
/common/config/params.php
- Change other params in file
/common/config/params.php
, for example set:'user.sendActivationEmail' => true
- PhpStorm: Mark the file
/vendor/yiisoft/yii2/Yii.php
as plain text (right-click "Mark as Plain Text")
Helpful commands:
# init RBAC roles
php yii rbac/init
# Extract message translations
php yii message @console/config/translation.php
# Create/Update demo user and demo-data
php yii demo/fill
crontab:
# @midnight: Run Garbage Collector
0 0 * * * /usr/bin/php -q /app/yii garbage-collector
# @midnight: yesterday full stats
0 0 * * * /usr/bin/php -q /app/yii stat/daily
# every hour in 30 minutes: totay stats
30 * * * * /usr/bin/php -q /app/yii stat/today