Manage and share your TCG collections and decklists.
- Ruby (the OS X or your Linux distribution's default installation is okay)
- VirtualBox
- Docker
- boot2docker on Mac OS X or Windows
This project uses Docker images and containers to ensure parity between development, testing, and production environments, without needing to keep multiple dependencies manually up-to-date on different machines. The correct versions of Ruby and Neo4j are used from Docker images, and containers for the application code and database instance are created and linked.
-
Clone the project and
cd
into it:$ git clone https://github.com/thetallgrassnet/deckshare.git $ cd deckshare
-
Bootstrap the application:
$ bin/setup
This builds a Docker image for the application, then creates Docker containers for the development and test databases and the application code, mounting the project directory to the application directory in the application container, and the
db/neo4j/[environment]/data/graph.db
directory to the location of thegraph.db
directory in the database containers, and linking the containers appropriately. -
Start the server using the helper script at
bin/d
:$ bin/d start
The helper script can be passed one of four different commands to start or stop the server, run specs, or run an arbitrary command. The
start
command starts the Neo4j database for the development environment, waits for it to be ready to accept connections, then starts the application server. The address and port for connecting to the server will be shown above the server output in the terminal.
$ git pull
$ bin/setup
Also re-run bin/setup
whenever any changes are made to the Gemfile
or
Dockerfile
to rebuild the application image and containers.
$ bin/d spec [ARGUMENTS]
$ bin/d run COMMAND [ARGUMENTS]
For example, to start a Rails console:
$ bin/d run bin/rails c
$ bin/d stop