Complete Setup Python + Flask Backend API Tutorial on Google Cloud

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น •

  • @theailanguage
    @theailanguage  9 วันที่ผ่านมา +1

    GITHUB REPO - github.com/theailanguage/python-flask-backend
    INSTALL VSCODE
    th-cam.com/video/IQnLvpyJMHE/w-d-xo.htmlm15s
    COMMANDS LIST
    pip3 install flask
    pip3 freeze {right angled bracket} requirements.txt
    DOCKER COMMANDS
    docker build --platform linux/amd64 --no-cache -t gcr.io/coastal-cascade-443805-g3/my-backend .
    docker images
    docker push gcr.io/coastal-cascade-443805-g3/my-backend
    GCLOUD COMMANDS
    gcloud init
    gcloud run deploy my-backend \
    --image gcr.io/coastal-cascade-443805-g3/my-backend \
    --platform managed \
    --region asia-south1 \
    --allow-unauthenticated
    gcloud run services list --region asia-south1
    gcloud run services delete my-backend --region asia-south1
    CURL COMMANDS
    curl -X POST my-backend-330676050223.asia-south1.run.app/v1/getInfo \
    -H "X-API-KEY: axsdTypoiUYTfsv89**hqiu19&&&" \
    -H "Content-Type: application/json"