Skip to content

irishchessunion/icu_www_app

 
 

Repository files navigation

This is the source code for version 2 of the Irish Chess Union's web site, www.icu.ie.

See the wiki for instructions on how to setup and maintain the server and application software.

Initial Setup

  1. Copy the Docker database configuration:

    cp config/examples/database-docker.yml config/database.yml
  2. Build the Docker images:

    docker-compose build
  3. Create and setup the database:

    docker-compose run --rm web bundle exec rails db:create db:migrate db:seed

Running the Application

Start all services (web server, MySQL, Redis):

docker-compose up

The application will be available at http://localhost:3000

To run in detached mode:

docker-compose up -d

To stop services:

docker-compose down

Running Tests

Run the full test suite:

docker-compose run --rm test

Run specific tests:

docker-compose run --rm test bundle exec rspec spec/models/
docker-compose run --rm test bundle exec rspec spec/features/some_feature_spec.rb

Useful Commands

Access Rails console:

docker-compose run --rm web bundle exec rails console

Run database migrations:

docker-compose run --rm web bundle exec rails db:migrate

Access bash inside the container:

docker-compose run --rm web bash

View logs:

docker-compose logs -f web

Rebuild after Gemfile changes:

docker-compose build web

Volumes

The Docker setup uses named volumes to persist data:

  • mysql_data - MySQL database files
  • redis_data - Redis data
  • bundle_cache - Bundled gems (speeds up rebuilds)

To reset the database completely:

docker-compose down -v
docker-compose up

About

A new website for the Irish Chess Union

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 56.8%
  • Haml 27.6%
  • JavaScript 13.1%
  • CSS 1.8%
  • Perl 0.3%
  • HTML 0.3%
  • Other 0.1%