IT61 / it61.info

Сайт Ростовского IT-сообщества

Home Page:www.it61.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It61

View performance data on Skylight

Requirements

  • Ruby 2.4.3 (with bundler)
  • PostgreSQL >= 9.5
  • Redis

Development setup

  1. Install gems: bundle install

  2. optional: Install overcommit for GIT commit hooks

  3. optional: Install GIT hooks with overcommit: overcommit --install -f

  4. optional: Run overcommit --sign to trust the hooks in this repository.

  5. Before creating the database you must setup connection strings for PostgreSQL and Redis. Put these default values to .env file:

    DATABASE_URL=postgres://postgres@localhost:5432/it61
    REDIS_URL=redis://localhost:6379
    
  6. Setup database and run migrations: rails db:setup

  7. Run server: ./bin/rails server

Docker development setup

Docker-based development environment requires docker-compose >= 1.9.0. Visit https://docs.docker.com/compose/install/ for more details.

Forwarded ports and access:

  • Web: http://localhost:3000 (host machine).
  • Database: postgres://postgres@localhost:6543 (host machine).

Use bin/dev helper script for docker-compose management. Run bin/dev -h to see help for this tool.

First time you will need to build containers, get gems installed and manually migrate database.

$ bin/dev up -d
$ bin/dev log
### wait until gems installed
$ bin/dev migrate
### develop
$ bin/dev stop

After first run when all gems installed and migration applied you can just use simple bin/dev start and bin/dev stop commands to start and stop dev environment.

Environment variables

  • ENABLE_QUERY_TRACE=[1|0] - enable query tracing for ActiveRecord;
  • RACK_MINI_PROFILER=[1|0] - enable the mini profiler.

Guidelines

Use the following guides for getting things done, programming well, and programming in style.

License

MIT

About

Сайт Ростовского IT-сообщества

www.it61.info

License:MIT License


Languages

Language:Ruby 45.2%Language:SCSS 22.7%Language:Slim 15.7%Language:JavaScript 13.4%Language:Shell 1.5%Language:HTML 1.2%Language:Dockerfile 0.3%Language:Procfile 0.0%