Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

brendandixon/thegatherings

Repository files navigation

The Gatherings

Stories in Ready

Making groups

  • Easy to Find
  • Easy to Connect
  • Easy to Manage

Development and Testing

While you may install and run theGatherings locally, it is easiest to use Docker for development and testing. The project includes a Dockerfile for the application and a Docker Compose file for running the application with the required MySQL database.

The Docker Compose configures MySQL to save data locally in a Docker Volume.

Prepare the Environment

    ./build
    docker-compose run --rm dev bundle exec rails dev:prime
    docker-compose run --rm test bundle exec rails db:environment:set

Note: The dev:prime and related Rake tasks (as is common with Rake tasks) do not retry if the database is unavailable. Occasionally, the download and start of MySQL is not "fast enough" causing the task to fail. If the task fails, normally, re-running it succeeds.

Run Migrations

    docker-componse run --rm dev bundle exec rails db:migrate

Run a development console

    docker-compose run --rm dev

This launches a Bash terminal within which you can run all Rails and Gem commands.

Run the development server

    docker-compose run --rm -p 3000:3000 -p 3035:3035 server

This command launches the application in the foreground, much like running Rails locally. The application will be available at http://localhost:3000/.

The faux data created via the rails dev:prime Rake task adds several user accounts including (with pa$$w0rd as the password):

Leaders

Members

Members numbered 72 or less (e.g., [email protected]) have affiliations with one or more Gatherings. Members numbered 73 or greater are unaffiliated. Women get assigned the odd integers (e.g., [email protected], [email protected]) and men the even integers (e.g., [email protected], [email protected]).

Run Tests

    docker-compose run --rm test bundle exec rspec

Stop all Docker Containers

    docker-compose down

Running in Production

TBD

About

Easy to find, easy to connect, easy to manage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published