inblog logo
|
p4rksk
    AI 에이전트

    Render 클라우드에 배포하기

    박선규's avatar
    박선규
    Apr 08, 2026
    Render 클라우드에 배포하기
    Contents
    라이브러리 파일 별도로 만들기Redner에 배포Starlette 버전 차이 오류단점 및 보완UptimeRobot 설정
    📌
    Render무료 플랜 있고 GitHub 연동 자동 배포다 보니까 포토폴리오 용으로 쓰기 적합해서 Render를 사용하자
     

    라이브러리 파일 별도로 만들기

    pip freeze > requirements.txt
    📌
    추후에 배포시에 이 파일보고 자동으로 필요한 라이브러리들 설치해준다.
     

    Redner에 배포

    RenderRenderRender | The cloud for builders
    Render | The cloud for builders

    Render | The cloud for builders

    Deploy and scale any app or agent from your first user to your billionth. Build faster on intuitive cloud infrastructure for the modern web.

    RenderRender
    📌
    깃으로 회원가입 하기
    notion image
    notion image
    notion image
     
    notion image
    📌
    깃 배포 연결할 레파지토리 설정하기
    notion image

    배포 후 서버 실행 포트 설정

    notion image
     

    API 키 등록하기

    notion image
    notion image
    📌
    env 파일에 등록된 API키 변수명이랑 동일해야지 render쪽에서 읽을 수 있음
    여기까지 하고 배포하기
     

    Starlette 버전 차이 오류

    notion image
    왜 문제냐면 starlette==1.0.0 이 너무 최신 버전이라 fastapi==0.135.3 이랑 충돌
    📌
    starlette는 FastAPI 내부에 프레임워크다.
    notion image
    📌
    버전 고치고 재 배포하기
    notion image
     
    notion image
     

    단점 및 보완

    📌
    무료플랜은 15분동안 접속을 하지 않을 경우 서버가 잠들어 깨는데 30초~50초 정도 걸린다 서버가 잠들지 않게 하기 위해 자동으로 서버를 깨우는 역할을 하는 UptimeRobot을 설정을 통해 5분마다 서버로 요청을 보낸다.

    UptimeRobot 설정

    1. uptimerobot.com 접속
    1. 회원가입
    1. "Add New Monitor" 클릭
    1. 설정:
        • Monitor Type: HTTP(s)
        • Friendly Name: site-agent
        • URL: https://site-agent.onrender.com
        • Monitoring Interval: 5 minutes
    1. Create Monitor 클릭
    pip freeze > requirements.txt
    📌
    추후에 배포시에 이 파일보고 자동으로 필요한 라이브러리들 설치해준다.
     
    Share article

    p4rksk

    RSS·Powered by Inblog