A backend application developed using FastAPI, designed for deployment on AWS EC2. This project incorporates Docker for containerization and includes a bash script to automate the setup process, making it ideal for learning DevOps practices and backend development.
-
FastAPI: High-performance Python web framework for building APIs.
-
Dockerized: Containerized application for consistent deployment across environments.
-
Automated Setup: Bash script to install dependencies, clone the repository, and deploy the application.
-
AWS EC2 Deployment: Easily deployable on AWS EC2 instances.
-
SQLite Database: Lightweight database for development and testing purposes.
-
Python 3.8 or higher
-
Git
-
Docker
-
AWS EC2 instance (Amazon Linux 2 or similar)
- Step 1: Connect your AWS EC2 instance via terminal
- Step 2: Run these following commands in your EC2 instance:
Create file setup_fastapi.sh: touch setup_fastapi.sh
Edit this file vim setup_fastapi.sh
Copy all inside this file to setup_fastapi.sh
Grant excecute permission: chmod +x setup_fastapi.sh
Execute the script: ./setup_fastapi.sh
Open in browser at address: http://<EC2_PUBLIC_IP>/docs to see Swagger UI.
Make sure the security group has opened port 80 (or the port you use).