This is the code which runs the DevCongress Jobs website, which lives at jobs.devcongress.org
Design specs available here
Install Docker and Docker Compose (Docker Compose comes with Docker on Windows and MacOS)
If your docker installation fails, you can install rails, ruby and postgress. Installing ubuntu on windows also makes your setup easier. After which you can do the following to get your project running
On first install, you will need to run a build to setup any dependencies and get you started.
Any application code changes are automatically reloaded, however, changes to certain files e.g. Dockerfile require a build.
./scripts/build.sh
docker-compose build --no-cache
: rebuild containersdocker-compose run --rm web bundle exec rails db:migrate db:seed
: apply migrations and seed the database./scripts/start.sh
docker-compose up --build
: build and start containersIf you'd rather run it in the background,
docker-compose up --build -d
: build and start containers in detached modeThe application runs at http://localhost:3000/
You can login with the default user created during seeding
- email: test@example.com
- password: password1
Mailcatcher is setup in development. You can view all outbound emails at http://localhost:1080/
docker-compose stop
: stop the running containers.docker-compose start
: start stopped containers.docker-compose down
: stop and remove containers and networks. you will need to recreate them using up
NOTE: all
docker-compose
commands should be run from the project directoryTIP: To remove any persisted data, delete the .volumes directory.
docker-compose stop
: stop any running containers to prevent contention over database filesdocker-compose run --rm web bundle exec rails db:migrate
: apply migrationsdocker-compose stop
: stop any running containers to prevent contention over database filesdocker-compose run --rm web bundle exec rails db:seed
: seed databasedocker-compose stop
: stop any running containers to prevent contention over database filesdocker-compose run --rm web bundle exec rails test
: run testsFor consistency sake, be using the latest stable versions of docker-compose
and docker
Linux
Scenario: ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
Solution: Run sudo usermod -aG docker ${USER}
. More details