live site http://peerage.midrealm.org
-
Run the
init.shscript:./init.sh
This will set up your .env file if you don't already have one, build the docker images, install the gems, and install the node modules.
For setting up the .env file, there's some logic to figure out what your UID and GID are so that the user in the container has the some UID and GID as you. Having those ids match means that files saved in the container (and then mapped to your workstation) will be owned by you. This has been a particular problem for Mac users.
-
Spin up the containers:
docker compose up -d
-
Set up the database
docker compose run --rm web bundle exec rails fake_data:allThis will create the databases, load the schema, and load the fake data. (The script for this is in
lib/tasks/fake_data.rake) -
You probably need to turn the
webcontainer back on again.docker compose up -dUse,
psto check that all of the containers are runningdocker compose ps -
View the development site in the browser: http://localhost:3000
-
To run tests, in the terminal run:
docker compose run --rm web bundle exec rspec