aditya172926 / landingpage

FresaClub Landing page

Home Page:https://fresaclub.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Landing page Fresa - MERN stack docker (Mysql Express React Nodejs)

  • Use Express Nodejs as backend
  • Use React script as frontend
  • Use MySQL as the database (v8)
  • Include self-signed SSL certificate (Let's Encrypt localhost format)
  • You can use make command to build fast

Table of contents

Host requirements

Both Docker and Docker Compose are required on the host to run this code

Configuration

Copy the env.example file as .env in both folder backend & frontend then populate according to your environment Create ssl folder in backend folder and copy your fullchain.pem & privatekey.pem

Deploy

Once configured the containers can be brought up using Docker Compose

  1. Set the environment variables and build the images

    docker-compose build
  2. Bring up the landing page containers

    docker-compose up -d 

    After a few moments the containers should be observed as running

    $ docker-compose ps
    Name                  Command               State                                   Ports
    -----------------------------------------------------------------------------------------------------------------------------
    landingpage   docker-entrypoint.sh pm2-r ...   Up      0.0.0.0:443->443/tcp,:::443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp

Teardown

For a complete teardown all containers must be stopped and removed along with the volumes and network that were created for the application containers

Commands

docker-compose stop
docker-compose down

Notes

Let's Encrypt SSL Certificate

Use: https://github.com/RENCI-NRIG/ez-letsencrypt - A shell script to obtain and renew Let's Encrypt certificates using Certbot's --webroot method of certificate issuance.

About

FresaClub Landing page

https://fresaclub.com/

License:Apache License 2.0


Languages

Language:JavaScript 98.8%Language:HTML 0.7%Language:Dockerfile 0.2%Language:Makefile 0.2%Language:CSS 0.1%Language:Shell 0.1%