Swing Out London is a swing dance listings website based on a custom CMS for listing links to dance events.
- Yarn is used in development.
- Postgres is the database. If you don't have a preference for how to run Postgres locally we recommend Postgres.app.
The postgres version you run locally should match the version used in production. If the app is deployed on Heroku (and you have access to it) you can check this with the Heroku CLI.
For example, to get the version used on Swing Out London production:
heroku pg:info --app soldneu
Other dependencies (including ruby) are listed in
.tool-versions
.
We recommend using asdf and running asdf install
to install these. If you're already managing dependencies in a
different way, ensure that you install the versions listed in
.tool_versions
.
Set up the app from scratch:
bin/setup
Run the tests and linters:
bin/rake
See Procfile.dev
: run each command in its own terminal, or
run them together using the heroku CLI (installed as part of the bundle):
heroku local -f Procfile.dev
Emails sent by the site can be previewed in the development environment at /rails/mailers.
This project uses .env to manage environment variables.
See .env.example
for documentation of environment variables
which can be used in development, some of which are required for the
application to run.
Running bin/setup
command will copy this file to your .env
- that's the
file you'll need to modify in order to change these variables. Restart your
server after editing this file.
The following variables are only used in the production environment and so are not included in the .env.example file:
IP_BLOCKLIST
(optional) A comma-separated list of IP addresses which should be blocked (e.g. spambots, attackers). Example:119.29.55.93,62.210.111.122
ROLLBAR_POST_SERVER_ITEM_ACCESS_TOKEN
Rollbar is used for exception reporting. This value can be found in Account Settings => Account Access Tokens in your Rollbar account.CANONICAL_HOST
- all variations of the domain will be301
redirected to this - eg. set it towww.swingoutlondon.co.uk
to haveswingoutlondon.co.uk
redirect to www.
There are currently 3 sites deployed using this codebase on heroku:
- London Production: https://www.swingoutlondon.co.uk/ (heroku app:
soldneu
) - Bristol Production: https://www.swingoutbristol.org/ (heroku app:
swing-out-bristol
) - Staging: https://soldn-staging.herokuapp.com/ (heroku app:
soldn-staging
)- used for testing changes. (Protected by HTTP Basic Authentication)