$ git clone https://github.com/opensanca/opensanca_jobs.git
$ cd opensanca_jobs
Your environment variables goes here in .env
# cp .env.sample .env
You can run OpenJobs locally by two ways.
- Local classic development.
- Local Docker development.
The application uses Ruby 2.7.2. You should install it to run the application. (for development we recommend to use RVM)
We use PostgreSQL as database. You should install it to run the app.
If needed, you should configure the config/database.yml
file.
Tip - If you don't like boring installations. Try Docker containers.
You can use Docker to easy database setup.
$ docker run --name postgres_open_jobs \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_DB=opensanca_jobs_development \ -e POSTGRES_USER=postgres \ -p 5432:5432 -d postgres:9.6.5
We use Redis for asynchronous jobs.
Tip - Try Docker containers.
You can use Docker to startup Redis.
$ docker run --name redis -p 6379:6379 -d redis
For local development, we suggest to use Mailhog (https://github.com/mailhog/MailHog) or Mailcatcher (https://mailcatcher.me/)
Install the dependencies and configure the database
$ bin/setup
Run the tests
$ rspec .
Start the app:
$ bin/rails s
Starting containers
$ docker-compose up
Configure database schemas and migrations (the containers should be up for the command below to work, so be sure to run the command above before proceeding):
$ docker-compose exec web bin/setup
Navigate to http://localhost:3000 to access