Skip to content

Binary Studio Academy 2019 PHP group project. Metrica collects data from web pages, handle it and visualize.

License

Notifications You must be signed in to change notification settings

TumkoVolodymyr/bsa-2019-metrica

 
 

Repository files navigation

BSA 2019 | PHP | Metrica

Build Status Codacy Badge StyleCI License: MIT

Description

Metrica is an analog of Google Analytics. The main purpose is to collect data from web pages, handle it and visualize.

Metrica

Installation. Unix

cp docker-compose.override.yml.general docker-compose.override.yml
cp .env.example .env

docker-compose run --rm frontend npm install

docker-compose up -d

cp backend/.env.example backend/.env
docker-compose exec app composer install
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan jwt:secret
docker-compose exec app php artisan migrate --seed

cp frontend/.env.example frontend/.env

Open browser:

https://localhost:8443

Installation. Windows

First of all make sure you have installed node:12.7.

cp docker-compose.override.yml.windows docker-compose.override.yml
cp .env.example .env
docker-compose up -d

docker-compose exec app composer install

docker-compose exec app php artisan key:generate
docker-compose exec app php artisan jwt:secret
docker-compose exec app php artisan migrate --seed

cp frontend/.env.example frontend/.env

cd frontend
npm install

npm run serve

Open browser:

http://localhost:3000

Setup pusher

Sign up Pusher.

Create application.

Fill backend/.env variables:

BROADCAST_DRIVER=pusher
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=

Fill frontend/.env variables:

PUSHER_APP_KEY=
PUSHER_CLUSTER=
PUSHER_AUTH_ENDPOINT=/broadcasting/auth

Build tracking JS script

Setup .env file in the frontend directory

VUE_APP_API_URL=
VUE_APP_URL=

then run command

docker-compose exec frontend npm run build:script

Contributors

Elasticsearch troubleshoot

The vm.max_map_count kernel setting needs to be set to at least 262144 for production use. Depending on your platform:

Linux

$ sysctl -w vm.max_map_count=262144

macOS with Docker for Mac

$ screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

sysctl -w vm.max_map_count=262144

Windows and macOS with Docker Toolbox

docker-machine ssh sudo sysctl -w vm.max_map_count=262144

or

docker-machine ssh

tce-load -w -i nano.tcz

sudo sysctl -w vm.max_map_count=262144

cat /proc/sys/vm/max_map_count

sudo nano /mnt/sda1/var/lib/boot2docker/profile

# put this line in the end of file
sudo sysctl -w vm.max_map_count=262144

# save it

Ctrl+O

exit

docker-machine restart default

Copyright and License

Metrica was written by PHP team of Binary Studio Academy in 2019 and is released under the MIT License.

Copyright (c) 2019 Binary Studio Academy

About

Binary Studio Academy 2019 PHP group project. Metrica collects data from web pages, handle it and visualize.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 63.5%
  • Vue 18.0%
  • JavaScript 15.8%
  • HTML 1.1%
  • CSS 0.6%
  • Shell 0.6%
  • Dockerfile 0.4%