React Boilerplate with authentication and admin dashboard
402
See README for more information
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.
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
Content type
Image
Digest
Size
530.7 MB
Last updated
over 8 years ago
docker pull hutchgrant/react-boilerplate