Chore: Sidekiq ActionCable fix for Development (#405)

- action cable works from sidekiq in development environments
- documentation updates for docker
This commit is contained in:
Sojan Jose
2020-01-05 23:26:22 +05:30
committed by Pranav Raj S
parent f178429df2
commit 91ace96acd
6 changed files with 40 additions and 14 deletions

View File

@@ -7,6 +7,12 @@ title: "Docker Setup and Debugging Guide"
After cloning the repo and installing docker on your machine, run the following command from the root directory of the project.
```bash
cp .env.example .env
```
Make changes to the `.env` file as required. [Optional]
```bash
docker-compose build
```
@@ -14,19 +20,19 @@ docker-compose build
After building the image or after destroying the stack you would have to reset the database using following command
```bash
docker-compose run rails bundle exec rails db:reset
docker-compose run --rm rails bundle exec rails db:reset
```
### Running the app
```bash
docker-compose run --service-port rails
docker-compose run --rm --service-port rails
```
open another terminal and also run below command to run sidekiq in a separate service
```
docker-compose run rails bundle exec sidekiq
docker-compose run --rm rails bundle exec sidekiq
```
* Access the rails app frontend by visiting `http://0.0.0.0:3000/`
@@ -50,13 +56,13 @@ docker-compose down
For running the complete rspec tests
```bash
docker-compose run rails bundle exec rspec
docker-compose run --rm rails bundle exec rspec
```
For running specific test:
```bash
docker-compose run rails bundle exec rspec spec/<path-to-file>:<line-number>
docker-compose run --rm rails bundle exec rspec spec/<path-to-file>:<line-number>
```
## production environment