Public api available at: https://xpo.restful-api.site
How to use api you can check from doc/xpo.postman_collection.json
- Clone this repo
git clone <repo_url>
- Create
.env
file (touch .env
) - Generate new secret
bundle exec rake secret
- Create
DEVISE_SECRET_KEY
variable in.env
file with value from previous step - Create
RAILS_ENV
variable in.env
with valueproduction
ordevelopment
- Check Docker and docker-compose installations
- Run
docker-compose build
for building app image
- Check if postgres instance is available (start cmd:
systemctl start postgres
orbrew services start postgres
) - Check if redis instance is available (start cmd:
redis-server
) - Create and setup database:
rake db:{create,setup}
- Start the sidekiq:
sidekiq -e $RAILS_ENV
- To start development server:
rails server webrick -b 127.0.0.1 -p 3000 -e development
- To start production Puma server:
rails server Puma -b 127.0.0.1 -p 3000 -e production
- Up postgres service
docker-compose up db redis
- (Optional, if needed) Run db setup:
docker-compose run web rake db:{create,setup}
- Start the sidekiq:
docker-compose up sidekiq
- To start server:
docker-compose up web
- To stop server for non-Docker users:
CTRL+C
- To stop server for Docker users:
docker-compose stop
ordocker-compose down
for stopping and removing all containers/networks/volumes that were created to start the app.