Rails application used to run a wrestling tournament.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
deploy
lib
log
public
test
vendor/assets
.dockerignore
.gitignore
.project
.travis.yml
Gemfile
Gemfile.lock
LICENSE
Procfile
README.rdoc
Rakefile
config.ru

README.rdoc

README

Build Status

This application is being created to run a wrestling tournament.

License:

MIT License

Public production page:

https://wrestlingdev.com

Development details:

  • Ruby 2.5.1

  • Rails 5.2.2

  • Install gems without production bundle install --without production

  • Test with minitest rake test

  • Seeds created for development rake db:seed

  • Finish all matches from seed data (this take ~ 5 minutes) rake finish_seed_tournament

  • Development login email: test@test.com password: password

Docker instructions:

  • Building and running the image: bash rails-dev.sh wrestlingapp This will mount your local directory to /rails inside the container and will open port 3000 to port 3000 on your local machine.

  • After running the above script, you'll be presented a shell. You'll need to run bash rails-dev-db.sh to set up the development db's. After those are set up, you can run rake test to run the tests or rails s -b 0.0.0.0 to run a development server. You can also run any other rails commands from here.

Production details:

  • Set up env file

export WRESTLINGDEV_ENV_FILE=/path/where/envfile/exists/envfilename.env

  • Env file should contain the following env's

WRESTLINGDEV_DB_NAME=databasename

WRESTLINGDEV_DB_USER=databaseusername

WRESTLINGDEV_DB_PWD=databasepassword

WRESTLINGDEV_DB_HOST=database.homename

WRESTLINGDEV_DB_PORT=databaseport

WRESTLINGDEV_DEVISE_SECRET_KEY=devise_key can be generated with rake secret

WRESTLINGDEV_SECRET_KEY_BASE=secret_key can be generated with rake secret

  • Optional env's

WRESTLINGDEV_NEW_RELIC_LICENSE_KEY=new_relic_license_key this is only needed to use new relic

MEMCACHIER_PASSWORD=memcachier_password this is only needed for caching

MEMCACHIER_SERVERS=memcachier_hostname:memcachier_port this is only needed for caching

MEMCACHIER_USERNAME=memcachier_username this is only needed for caching

  • Production docker image: Run bash rails-prod.sh wrestlingapp. This will create a self-signed ssl certificate and set up wrestlingapp on passenger/apache. The container will run with port 80 and port 443 open and will have a restart policy of always.