The project consists of two components:
- Infrastructure as Code application based on AWS CDK (main)
- Simple node.js app called Library App
IaC app: CloudFormation with CDK framework written in TypeScript
Library app:
- Frontend: JavaScript, CSS, HTML
- Backend: Node.js, Nginx, Docker, Docker Compose
- Database: MySQL
- Frontend:
- Static
.js,.css,.htmlfiles underfrontend/directory
- Backend:
- Reverse proxy built on Nginx
- Node.js backend app
- MySQL database
- Clone the repository
- Edit
.envfile located in the root directory (MYSQL_USER,MYSQL_PASSWORD,MYSQL_ROOT_PASSWORDare mandatory) - In the root directory of the project run:
docker-compose up
That command will start nginx, backend and database containers. The backend app will be running on http://localhost:8080
The diagram which describes the infrastructure in detail is located in diagram/ directory.
The rafalwolny.pl domain is provided by OVH registrar and configuration management is delegated to AWS Route53 hosted zone
- AWS account
- User with active access keys and appropriate permissions (admin access recommended)
- AWS CLI installed and configured on the workstation
- AWS CDK installed and configured on the workstation
- cloned repository
- (optional) Check what changes are going to be done on AWS using this command in /cdk directory:
cdk diff
- In the project's root directory run:
./deploy