Skip to content

Latest commit

 

History

History
73 lines (63 loc) · 1.46 KB

steps to write python(flask) code.md

File metadata and controls

73 lines (63 loc) · 1.46 KB

#steps to write python code.

  1. open terminal and Follow this commands
mkdir project
cd project
  1. Create virtual enviroment and download required dependencies.
virtualenv virt
source virt/bin/activate
pip install flask
pip install mysql-connector-python
  1. create application file and template folder
touch application.py
mkdir template
touch application.py
cd template
touch sign_up.html
touch page.html
  1. Get all your requirements into one file.
pip freeze > requirements.txt 
  1. Create .ebignore file and paste your environement there and save this file.
  2. Two more files should be created i.e. .elasticbeanstalk and .gitgnore. (This files gets created by itself if project(python code) is deployed from terminal)

.elasticbeanstalk file

branch-defaults:
  default:
    environment: environment name
environment-defaults:
  environment name-env:
    branch: null
    repository: null
global:
  application_name: application name
  branch: branch name
  default_ec2_keyname: null
  default_platform: Python 3.8 running on 64bit Amazon Linux 2
  default_region: ap-south-1
  include_git_submodules: true
  instance_profile: null
  platform_name: null
  platform_version: null
  profile: eb-cli
  repository: aws-app
  sc: git
  workspace_type: Application

.gitgnore file

.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml