搜索

PythonReactSEOPDF
GitHub Skill

deployment

Render deployment instructions for LogiAccounting Pro. Use when deploying to production or configuring hosting.

Federicojaviermartino☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Deployment Skill

This skill provides guidance for deploying LogiAccounting Pro to Render.

Prerequisites

  • GitHub repository with the project
  • Render account (free tier works)
  • Environment variables configured

Quick Deploy

Option 1: Blueprint (Recommended)

The project includes render.yaml for automatic configuration:

# Just push to GitHub and connect to Render
git push origin main

Then in Render:

  1. New → Blueprint
  2. Connect GitHub repo
  3. Select render.yaml
  4. Deploy
Option 2: Manual Setup
  1. Create Web Service

    • Environment: Python 3
    • Build Command: cd frontend && npm install && npm run build && cd ../backend && pip install -r requirements.txt
    • Start Command: cd backend && uvicorn app.main:app --host 0.0.0.0 --port $PORT
  2. Environment Variables

    SECRET_KEY=<generate-random-string>
    PYTHON_VERSION=3.11.0
    NODE_VERSION=20
    

render.yaml Reference

services:
  - type: web
    name: logiaccounting-pro
    runtime: python
    region: oregon
    plan: free
    buildCommand: |
      cd frontend && npm install && npm run build &&
      cd ../backend && pip install -r requirements.txt
    startCommand: cd backend && uvicorn app.main:app --host 0.0.0.0 --port $PORT
    envVars:
      - key: SECRET_KEY
        generateValue: true
      - key: PYTHON_VERSION
        value: 3.11.0
      - key: NODE_VERSION
        value: 20
    healthCheckPath: /health

Environment Variables

Variable Required Description
SECRET_KEY Yes JWT signing key (auto-generated)
PYTHON_VERSION Yes Python runtime version
NODE_VERSION Yes Node.js for frontend build
DATABASE_URL No PostgreSQL connection (future)

Health Check

The API exposes /health endpoint:

curl https://your-app.onrender.com/health
# {"status": "healthy"}

Troubleshooting

Build Fails
# Check Node.js version
node --version  # Should be 20+

# Check Python version
python --version  # Should be 3.11+

# Manual build test
cd frontend && npm run build
cd backend && pip install -r requirements.txt
502 Bad Gateway
  • Check start command is correct
  • Verify PORT environment variable
  • Check Render logs for errors
Static Files Not Loading

Ensure FastAPI serves the frontend build:

# backend/app/main.py
app.mount("/", StaticFiles(directory="../frontend/dist", html=True))

Post-Deployment

  1. Test all demo credentials work
  2. Verify API endpoints respond
  3. Check CORS allows your domain
  4. Monitor for errors in Render dashboard

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!