React-based static site to be deployed using docker-compose
This repository contains the development envrionment for developing and publishing a static site built using React and SASS.
This repo has only been tested on UNIX systems. Windows is untested.
├── app/ # Application space
│ ├── package.json # NodeJS project dependencies
│ ├── src
│ │ ├── app
│ │ │ ├── comp/ # React components
│ │ │ ├── const/ # Configurable fields
│ │ │ └── index.jsx # App entrypoint
│ │ └── scss/ # App styles
│ ├── static/
│ │ ├── img/ # Static images
│ │ └── index.html # HTML Boilerplate
│ └── webpack.config.js # Webpack build configuration
|
├── build/
│ ├── certbot/ # AUTO-GENERATED; Used by certbot service to populate SSL certificates
│ ├── dist/ # AUTO-GENERATED; Application production bundle
│ └── nginx/
│ └── app.conf # Reverse proxy configuration
|
├── docker-compose.yml # Production stack configuration
├── Dockerfile.dev # CONTAINER: Development in container
├── Dockerfile.prod # CONTAINER: Building production buncle
├── init.prod.sh # PROD-SCRIPT: Initialize prod stack with SSL certificates
├── run.dev.sh # DEV-SCRIPT: Run dev envrionment in container
└── update.prod.sh # PROD-SCRIPT: Update already-running stack
Development is performed within a docker container that isolates all the projects dependencies needed:
./run.dev.shThe production build for this project involves:
- Building a production bundle of the site using webpack
- Hosting the generated static site using NGINX
- Periodically generating SSL certificates using certbot
When SSL certificates have not been pulled down yet for this machine, run the following command:
./init.prod.shThen run the production update script:
./update.prod.shNow both users will be able to access the site on HTTPS(443)
See CHANGELOG
- Fork it (https://github.com/yourname/yourproject/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Irusha Vidanamadura – irusha@vidanamadura.net
Distributed under the MIT license. See LICENSE for more information.