-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updtade Read.me with Docker instructions
- Loading branch information
1 parent
5313010
commit f47a468
Showing
1 changed file
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,42 @@ | ||
# README | ||
This is a simple blog API project written in Ruby on Rails. The main objective of this is to serve as a study and showcase for Ruby on Rails features. | ||
|
||
### Ruby version | ||
## Ruby version | ||
3.1.2 | ||
|
||
### Database creation | ||
`bundle exec rake db:create` | ||
|
||
### Database | ||
## Database | ||
PostgreSQL | ||
|
||
### How to run the test suite | ||
## Running on Docker containers | ||
|
||
Build and start cotainers: | ||
|
||
`docker-compose up` | ||
|
||
API will run on `localhost:3000`. | ||
|
||
If running for the first time, create the database: | ||
|
||
`docker compose run web rake db:create` | ||
|
||
If there are pending migrations, run migrations: | ||
|
||
`docker compose run web rake db:migrate` | ||
|
||
## Running on local machine | ||
Make sure you have: | ||
- Required Ruby version | ||
- Bundler | ||
- Postgres database running | ||
|
||
#### Database creation | ||
`bundle exec rake db:create` | ||
|
||
#### How to run the test suite | ||
`bundle exec rspec` | ||
|
||
### Start server | ||
#### Start server | ||
`bundle exec rails s` | ||
|
||
### Start console | ||
#### Start console | ||
`bundle exec rails c` |