- π About the Project
- π» Getting Started
- π₯ Authors
- π Future Features
- π€ Contributing
- βοΈ Show your support
- π Acknowledgements
- β FAQ (OPTIONAL)
- π License
[SPA-SSR, DOCKER, NGINX, OPENSSL, BASH & AWS] This repository provides an example of how to deploy a JavaScript Single Page Application which was built using plain JavaScript, Webpack and Express. The main goal is to show how to deploy SPA-SSR application on AWS without relying on any GitOps methodology. The idea is to demonstrate an alternative approach to application deployment that is not dependent on any configuration management tool, infrastructure automation tool, or CI/CD pipeline.
- [SPA Architecture]
- [Server-Side Menu Rendering]
- [ES6 Modules]
- [Webpack Bundling ]
- [Express Server to handle routing]
- [Docker Integration]
- [Nginx Configuration]
- [OpenSSL Configuation]
- [AWS EC2 Instances Deploy]
The project showcases the implementation of a Single Page Application using Webpack and Express.
Express is configured to dynamically render menu paths on the server side, eliminating the need for full page reloads when navigating between menu items. The menu filters the max supply, low supply and profile cards of each cryptocurrency.
The project employs Webpack for bundling and optimizing client-side assets, resulting in a performant and efficient front-end.
The project utilizes Docker Compose to build and run the application to AWS EC2 instances.
Nginx as a reverse proxy to route requests through express to serve static assets.
The project uses a bash scrit to automate the deployment of the application to AWS EC2 instances.
The project utilizes OpenSSL to generate a self-signed certificate for Nginx.
The project deploys the application into an AWS EC2 instance.
To get a local copy up and running, follow these steps.
To run this project you need the following tools installed:
- [Git and GitHub ]
- [Webpack ]
- [Express ]
- [Docker ]
- [Docker Compose ]
- [OpenSSL ]
- [Bash Script ]
- [Nginx ]
- [AWS EC2 Instances ]
Clone this repository to your desired folder:
cd deploy-SPA-DockerCompose
git clone git@github.com:alyconr/deploy-SPA-DockerCompose
Install this project with:
cd deploy-SPA-DockerCompose
npm install
To run locally run the following command:
npm run build-dev
npm run devserver-reload
npm run build-prod
npm run server-prod
To run tests, run the following command:
To test the Stylelint linter:
npx stylelint "**/*.{css,scss}"
To test the Webhint:
npx hint .
To test the ESLint linter:
npx eslint .
The image below shows the arquitecture with all the resources configured:
Run the following command to install the necessary dependencies from the bash script file:
bash installpackages.sh -u $USER -i $IP_PUBLIC_SERVER -s $IP_PRIVATE_SERVER
Run the following command to deploy the project to AWS EC2 instances:
bash deployment.sh -u $USER -i $IP_PUBLIC_SERVER -s $IP_PRIVATE_SERVER -d $APP_FOLDER -f $EXPRESS_FOLDER -e prod
JEYSSON CONTRERAS
π€ Author1
- [kubernetes deployment]
- [CloudForm deployment]
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Write a message to encourage readers to support your project
If you like this project please give one start.
I would like to thank God for giving me the strength to carry out this project.
This project is MIT licensed.