From ed99543d813c83664ec47d3708ed11cf6bb7acd0 Mon Sep 17 00:00:00 2001 From: kenystev Date: Sun, 27 Jan 2019 22:41:17 -0600 Subject: [PATCH 1/2] [EDIT] Readme.md - Docker Work around for postgresql and redis-server --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 123853ef..22d119f7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## React on Rails Pro and ShakaCode Pro Support -React on Rails Pro provides Node server rendering and other performance enhancements for React on Rails. +React on Rails Pro provides Node server rendering and other performance enhancements for React on Rails. [![2018-09-11_10-31-11](https://user-images.githubusercontent.com/1118459/45467845-5bcc7400-b6bd-11e8-91e1-e0cf806d4ea4.png)](https://blog.shakacode.com/hvmns-90-reduction-in-server-response-time-from-react-on-rails-pro-eb08226687db) @@ -23,7 +23,7 @@ The [ShakaCode Pro Support Plan](http://www.shakacode.com/work/shakacode-pro-sup * Best practices based on over four years of React on Rails experience. * Using [Reason](https://reasonml.github.io/) with (or without) React on Rails. -ShakaCode can also help you with your custom software development needs. We specialize in marketplace and e-commerce applications that utilize both Rails and React. Because we own [HawaiiChee.com](https://www.hawaiichee.com), we can leverage that code for your app! +ShakaCode can also help you with your custom software development needs. We specialize in marketplace and e-commerce applications that utilize both Rails and React. Because we own [HawaiiChee.com](https://www.hawaiichee.com), we can leverage that code for your app! The article [Why Hire ShakaCode?](https://blog.shakacode.com/can-shakacode-help-you-4a5b1e5a8a63#.jex6tg9w9) provides additional details about our projects. @@ -153,6 +153,24 @@ See package.json and Gemfile for versions 1. Open a browser tab to http://localhost:3000 for the Rails app example. 2. When you make changes, you have to refresh the browser page. +### Docker Workaround for `postgresql` and `redis-server` through containers +1. `docker container run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres` + 1. Open file: config/database.yml + 2. The final result should be like this: + ``` + default: &default + adapter: postgresql + host: localhost + port: 5432 + username: postgres + password: 'mysecretpassword' + ``` + 3. `rake db:setup` +2. `docker container run --name some-redis -p 6379:6379 -d redis` +3. After finishing working the project remember to stop the containers +4. `docker container stop some-postgres` +4. `docker container stop some-redis` + ### Basic Command Line 1. Run all linters and tests: `rake` 1. See all npm commands: `yarn run` From ba66a43ef2567f4ae3a6e3db06d4d8bef6416cdc Mon Sep 17 00:00:00 2001 From: kenystev Date: Sun, 27 Jan 2019 22:44:59 -0600 Subject: [PATCH 2/2] [EDIT] Readme.md - Table of Content Entry link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 22d119f7..2c0c4e4a 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ You can see this tutorial live here: [http://reactrails.com/](http://reactrails. + [Demoed Functionality](#demoed-functionality) + [Technologies Involved](#technologies-involved) + [Basic Demo Setup](#basic-demo-setup) + + [Docker Workaround for postgresql and redis server](#docker-workaround-for-postgresql-and-redis-server-through-containers) + [Basic Command Line](#basic-command-line) + [Experimenting with Hot Reloading](#experimenting-with-hot-reloading-applies-to-both-procfilehot-and-procfileexpress) + [Javascript Development without Rails](#javascript-development-without-rails-using-the-webpack-dev-server)