Giter Site home page Giter Site logo

training-project's Introduction

Training Project

This was an exercise to practice how to deploy a full stack application in EC2. This exercise uses Flask and Jinja2 Templates to render out a simple student application.

Setup:

Get your EC2 instance up and running

sudo apt update;
sudo apt upgrade -y;
sudo apt install nginx python3 python3-pip python3-venv;

Edit the NGINX configuration by creating a new file in /etc/nginx/sites-enabled. I named mine as server_config but feel free to name it anything you want.

server {
    listen 80;
    server_name 31.1.0.2; # {your ec2 public ip}
    location / {
        proxy_pass http:127.0.0.1:5000; # {your flask/fastapi/express application api endpoint}
    }
}

And then, restart nginx to apply the configuration by doing

sudo systemctl restart nginx

Check that nginx is working perfectly by doing

sudo systemctl status nginx

And then, clone this repository in your EC2 instance, install the required dependencies and run main.py

git clone https://github.com/Eyepan/training-project.git
cd training-project
pip install -r requirements.txt
python main.py

And you're done. To check, go to http://{your public ip} and see.

training-project's People

Contributors

eyepan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.