longlog/web

LongLog web application

1.0.0 2017-12-10 02:26 UTC

This package is auto-updated.

Last update: 2024-04-27 21:05:04 UTC


README

LongLog web-application.

Installation

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

Vagrant installation

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

Configurations

  1. Register new reCAPTCHA API keys and replace it in /common/config/params.php
  2. Change other params in file /common/config/params.php, for example set: 'user.sendActivationEmail' => true
  3. 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