Giter VIP home page Giter VIP logo

jobs's Introduction

Build Status View performance data on Skylight View performance data on Skylight View performance data on Skylight View performance data on Skylight

DevCongress Jobs

This is the code which runs the DevCongress Jobs website, which lives at jobs.devcongress.org

Design specs available here

Docker setup

Requirements

Install Docker and Docker Compose (Docker Compose comes with Docker on Windows and MacOS)

Alternative for windows

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

  • Run bundle install
  • Run rake db:create to create your db
  • Run bin/rails db:migrate RAILS_ENV=development to migrate your db
  • Serve your project

Build

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.

Linux/Mac

  • ./scripts/build.sh

Others

  • docker-compose build --no-cache: rebuild containers
  • docker-compose run --rm web bundle exec rails db:migrate db:seed: apply migrations and seed the database

Run

Linux/Mac

  • ./scripts/start.sh

Others

  • docker-compose up --build: build and start containers

If you'd rather run it in the background,

  • docker-compose up --build -d: build and start containers in detached mode

Develop

The application runs at http://localhost:3000/

You can login with the default user created during seeding

Emails

Mailcatcher is setup in development. You can view all outbound emails at http://localhost:1080/

Helpful Commands

  • 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 directory

TIP: To remove any persisted data, delete the .volumes directory.

Migrations

  • docker-compose stop: stop any running containers to prevent contention over database files
  • docker-compose run --rm web bundle exec rails db:migrate: apply migrations

Seeding

  • docker-compose stop: stop any running containers to prevent contention over database files
  • docker-compose run --rm web bundle exec rails db:seed: seed database

Testing

  • docker-compose stop: stop any running containers to prevent contention over database files
  • docker-compose run --rm web bundle exec rails test: run tests

Troubleshooting

For 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

jobs's People

Contributors

claudey avatar colinwarmstrong avatar depfu[bot] avatar edemkumodzi avatar idoqo avatar jadijadi avatar kaypee901 avatar robbieakoto avatar seanmavley avatar silentworks avatar thedumbtechguy avatar yawboakye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.