- Clone this project
- Flow steps bellow to run (I recommend to use docker option)
- Be happy
Be sure that docker and docker compose are installed in your computer, if not, flow these tutorials (ubuntu based)
For docker
https://www.digitalocean.com/community/tutorials/como-instalar-e-usar-o-docker-no-ubuntu-16-04-pt
For docker-compose
https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04
Inside root path project, run command docker-compose up -d
and wait while pull and build images
After all load with success, you will have two url:
System http://localhost:3000 Page sample http://localhost:8000
Inside root path project, run command docker-compose up -d
and wait to stop. If you not, the project will run forever
Be sure that redis and postgres was installed on the machine, if not, install it
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04
Be sure if nodejs and yarn are installed on your machine, if not, flow below to install
Add node repository
curl -sL https://deb.nodesource.com/setup_9.x | sudo bash -
Add yarn repository
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
Install
sudo apt-get update && apt-get install -y nodejs yarn
Edit hosts
file with sudo
sudo vim /etc/hosts
and add lines bellow on the end of file
127.0.0.1 postgres
127.0.0.1 rails
127.0.0.1 redis
Inside the directory nav-tracking-rails, on project path, execute commands below
yarn install
rake webpacker::compile
Inside the directory nav-tracking-rails, on project path, execute command below
rake db:create db:schema:load
Inside the directory nav-tracking-rails
, on project path, execute commands below
bundle exec sidekiq -d
Inside the directory nav-tracking-rails
, on project path, execute commands below
bundle exec whenever --update-crontab
Inside the directory nav-tracking-rails
, on project path, execute commands below
rails s
Now, you can access url http://localhost:3000
Inside the directory page-sample
, on probject path, flow one instruction bellow
- open file
index.html
- run
python -m SimpleHTTPServer
(need python installed on computer)