Sign inSign up

hutchgrant/react-boilerplate

By hutchgrant

•Updated over 8 years ago

React Boilerplate with authentication and admin dashboard

Image
0

412

hutchgrant/react-boilerplate repository overview

⁠React Boilerplate

See README⁠ for more information

⁠Development Stack Instructions

Run the react boilerplate stack with mongo, nginx, redis, nodejs, containers by doing the following:

Download the docker-compose.yml file

wget https://raw.githubusercontent.com/hutchgrant/react-boilerplate/master/docker-compose.yml

create a file, call it whatever.env

Add the following env variables to the whatever.env


MONGO_URI=mongodb://mongo/reactboiler
COOKIE_KEY=some-random-cookie-key
SESSION_KEY=some-random-session-key
TOKEN_SECRET=some-random-token-key
REDIRECT_DOMAIN=http://localhost:3000
SITE_NAME=react-boilerplate

GOOGLE_RECAPTCHA_SECRET=some-recaptcha-key
REACT_APP_GOOGLE_RECAPTCHA_SITE_KEY=YourGoogleRecaptchaKey

GOOGLE_CLIENT_ID=some-google-key
GOOGLE_CLIENT_SECRET=some-google-secret-key
FACEBOOK_CLIENT_ID=some-facebook-id
FACEBOOK_CLIENT_SECRET=some-facebook-secret
TWITTER_CONSUMER_ID=some-twitter-id
TWITTER_CONSUMER_SECRET=some-twitter-secret

[email protected]
SMTP_PASS=your-password

Edit docker-compose.yml so that env_file points to your whatever.env file path and name.

See project docker readme⁠ for information about setting up all these developer keys from google, facebook, and twitter.

Launch stack with:

docker-compose up



add -d to run it in detached mode in the background.

⁠Production

Similar steps as above except download this file:

wget https://raw.githubusercontent.com/hutchgrant/react-boilerplate/master/docker-compose.prod.yml

create a whatever.env file and edit the docker-compose.prod.yml to use whatever.env name and path under env_file:

Use the same variables as above, except add the following variables to the bottom:

VIRTUAL_HOST=yoursite.com,www.yoursite.com
VIRTUAL_PORT=5000
LETSENCRYPT_HOST=yoursite.com,www.yoursite.com
[email protected]


Set it to your domain to generate a SSL certifcate and to configure nginx. See project docker readme⁠ for information about setting up all these developer keys from google, facebook, and twitter. As well as information on configuring nginx and lets encrypt.

Deploy stack with:

docker stack deploy -c docker-compose.yml reactboiler

Tag summary

Content type

Image

Digest

Size

530.7 MB

Last updated

over 8 years ago

docker pull hutchgrant/react-boilerplate