Rest Api built with rails 7.
-
First clone this repo with docker container run --rm -v $(pwd):/app -v ssh:/root/.ssh codeableorg/git clone {the ssh goes here}
-
Go to the directory and create a file with the .env extension and add this format
GIT_USER_NAME=NameHERE
GIT_USER_EMAIL=your_github_mail@goes.here
DB_HOST=test_bsale-xxxx_db_1
The DB_HOST will be setted later when you run the #3
- Run docker first
docker-compose up
- On a different window run:
docker compose exec client bash
- Inside the bash terminal run the command:
bootstrap
- Go to your .env file and fill the DB_HOST variable with your db_host from step 3
- Install all the gems with bundle install
- Initialize your DB: rails db:create db:migrate db:seed
- Finally you can run this command to open rails server
rails s -b 0.0.0.0
- Go to your browser and to this site. And enjoy it
http://localhost:3000/api/products
- If you got any problems booting the server or creating the db you can repeat from number 3 or verify the environment variables. That's it. Thanks for enjoying this app.