The GPL v3 license applies to the code in this repository.
The data is not included in this repository. Rather, it is accessed via the public API. This data is under a CC BY-SA license (and not GPL v3). Amongst other things, this license requires attribution when using the data.
sweet pinballin' brah
This repo is the codebase for pinballmap.com. The code for the Pinball Map mobile app is here. If you have an app issue, please use that repo.
Available here: http://pinballmap.com/api/v1/docs
Note: If you run into issues, you can quickly reach us in the discord
git clone https://github.com/{you}/pbm.git
git remote add upstream git://github.com/pinballmap/pbm.git
gem install bundler
bundle install
brew update
- Install postgresql package
- Download Postgres App
brew install postgresql
initdb /usr/local/var/postgres -E utf8
createuser --interactive
CREATEDB pbm_dev
cp config/database.yml.example config/database.yml
to create your database.yml for developmentbin/rake db:create ; RAILS_ENV=test bin/rake db:create
bin/rake db:migrate ; RAILS_ENV=test bin/rake db:migrate
- Go to https://www.maxmind.com and create an account
- Under "GeoIP / GeoLite" in the navigation menu, click "Download files"
- Find "GeoLite City" and "Download GZIP"
- Unzip it. There will be a file called GeoLite2-City.mmdb
- Place that file in the project folder, at 'tmp/GeoLite2-City.mmdb'
bin/rails s
bundle exec rspec
- Start server:
bin/debug
- Install VSCode command line tools via command palette. From the VSCode top Menu:
View | Command Palette
then search for:Shell Command: Install 'code' command in path
- Attach via VSCode debugger and set breakpoints
If the site loads properly it will be an empty version of pinballmap.com. A database dump can be obtained from this repo.
psql -U username -d pbm_dev < pbm_db_scrubbed.sql
bin/rails create_developer_account
# creates user:[email protected]
with passwordexample
Warning: None of us have used Docker since this was originally setup. We cannot vouch for the below steps at this point. If you want to update the instructions, please do.
- Docker >= v1.12.0+
- Docker-Compose (comes with Docker for Mac. Separate install on Linux)
- Optional: direnv or some other way to source environment variables to override default ports in case of conflict
- Run
docker-compose up -d
to start containers - Navigate to
localhost:$PORT
(either specified, or defaults to3000
) - Bring down containers with
docker-compose down
- By default, the database will keep its state as a docker volume. If you want to start fresh, run
docker-compose down -v
to destroy the volume. The next time you bring up this docker-compose file,db:create
anddb:migrate
will re-populate the database.
- By default, the database will keep its state as a docker volume. If you want to start fresh, run
If you just want to run postgres in a container and use your local filesystem for running Rails, you can use the postgres only compose file.
- Run
docker-compose -f docker-compose.postgres.yml up -d
- If first time running, run
bin/rake db:create db:migrate
to populate the postgres container. - Bring down containers with
docker-compose -f docker-compose.postgres.yml down
- By default, the database will keep its state as a docker volume. If you want to start fresh, run
docker-compose -f docker-compose.postgres.yml down -v
to destroy the volume.
- By default, the database will keep its state as a docker volume. If you want to start fresh, run