Giter Club home page Giter Club logo

react-express-letsencrypt-nginx-boilerplate's Introduction

react-node-letsencrypt-nginx-boilerplate

A full-stack https application boilerplate made with Docker, LetsEncrypt, Nginx, React, and Express

Prerequisites

  1. Docker
  2. Docker Compose
  3. Domain name with DNS records pointing at target machine

Installation

  1. Clone project
git clone https://github.com/munikeraragon/react-express-letsencrypt-nginx-boilerplate.git
  1. cd into folder
cd react-express-letsencrypt-nginx-boilerplate
  1. Edit init-letsecncrypt.sh by replacing "example.com" and "www.example.com" with your domain name

  2. Edit ./data/nginx/app.conf by replacing "example.com" with your domain name

  3. Edit ./server/index.js by replacing "example.com" with your domain name

  4. Generate Letsencrypt certificates

sudo ./init-letsencrypt.sh
  1. Create "nodecert" group to allow Express server to read letsencrypt certifictes
# Create group "nodecert" with gid=1024
sudo groupadd nodecert -g 1024

# Add root to the group "nodecert"
sudo usermod -a -G nodecert root

# make group "nodecert" owner of files recursively 
sudo chgrp -R nodecert data/certbot/conf/live
sudo chgrp -R nodecert data/certbot/conf/archive

# change permission of files to be accesible by group "nodecert"
sudo chmod -R 750 data/certbot/conf/live
sudo chmod -R 750 data/certbot/conf/archive
  1. Build docker-compose services
docker-compose build

Usage

  1. Run docker-compose services
docker-compose up
  1. Access React client at https://your_domain_name.com and Express server at https://your_domain_name.com:5000

Learn how it was made

Article: https://www.codegrow.org

react-express-letsencrypt-nginx-boilerplate's People

Contributors

munikeraragon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.