SOY NV AI
λ©νλ°μ΄ν° μμ± κΈ°λ₯ κ°μ : κΈ°μ‘΄ λ©νλ°μ΄ν° λ³ν© λ° νμ°¨ μ 보 μ μ§
d234e06
| # λΉ λ₯Έ λ°°ν¬ κ°μ΄λ (μμ½) | |
| ## 1λ¨κ³: DigitalOcean Droplet μμ± | |
| 1. https://www.digitalocean.com/ μ μ | |
| 2. Create β Droplets | |
| 3. μ€μ : | |
| - Ubuntu 22.04 LTS | |
| - 8GB RAM / 4 vCPUs ($48/μ) | |
| - Singapore λλ Seoul | |
| 4. SSH ν€ λλ λΉλ°λ²νΈ μ€μ | |
| 5. Create Droplet | |
| ## 2λ¨κ³: μλ² μ μ λ° μ΄κΈ° μ€μ | |
| ```bash | |
| # μλ² μ μ | |
| ssh root@YOUR_SERVER_IP | |
| # μμ€ν μ λ°μ΄νΈ λ° νμ ν¨ν€μ§ μ€μΉ | |
| apt update && apt upgrade -y | |
| apt install -y python3 python3-pip python3-venv git curl nginx certbot python3-certbot-nginx supervisor ufw build-essential | |
| # λ°©νλ²½ μ€μ | |
| ufw allow OpenSSH | |
| ufw allow 'Nginx Full' | |
| ufw allow 11434/tcp | |
| ufw enable | |
| ``` | |
| ## 3λ¨κ³: Ollama μ€μΉ | |
| ```bash | |
| curl -fsSL https://ollama.com/install.sh | sh | |
| systemctl enable ollama | |
| ollama pull llama2 # λλ μ¬μ©ν λͺ¨λΈ | |
| ``` | |
| ## 4λ¨κ³: νλ‘μ νΈ λ°°ν¬ | |
| ```bash | |
| # νλ‘μ νΈ λλ ν 리 μμ± | |
| mkdir -p /var/www | |
| cd /var/www | |
| # νλ‘μ νΈ νμΌ μ λ‘λ (Git λλ SCP) | |
| git clone YOUR_REPO_URL soy-nv-ai | |
| # λλ | |
| # scp -r "D:\SOY NV AI\*" root@YOUR_SERVER_IP:/var/www/soy-nv-ai/ | |
| cd soy-nv-ai | |
| # κ°μνκ²½ μ€μ | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| # νκ²½ λ³μ μ€μ | |
| nano .env | |
| # SECRET_KEY, OLLAMA_BASE_URL, GEMINI_API_KEY λ± μ€μ | |
| # λλ ν 리 μμ± | |
| mkdir -p instance uploads vector_db knowledge_graphs logs | |
| chmod -R 775 uploads instance vector_db | |
| ``` | |
| ## 5λ¨κ³: systemd μλΉμ€ μ€μ | |
| ```bash | |
| # μλΉμ€ νμΌ λ³΅μ¬ | |
| cp systemd/soy-nv-ai.service /etc/systemd/system/ | |
| # νμΌ μμ (κ²½λ‘ νμΈ) | |
| nano /etc/systemd/system/soy-nv-ai.service | |
| # μλΉμ€ νμ±ν | |
| systemctl daemon-reload | |
| systemctl enable soy-nv-ai | |
| systemctl start soy-nv-ai | |
| systemctl status soy-nv-ai | |
| ``` | |
| ## 6λ¨κ³: Nginx μ€μ | |
| ```bash | |
| # Nginx μ€μ νμΌ λ³΅μ¬ | |
| cp nginx/soy-nv-ai.conf /etc/nginx/sites-available/soy-nv-ai | |
| # λλ©μΈ/IP μμ | |
| nano /etc/nginx/sites-available/soy-nv-ai | |
| # νμ±ν | |
| ln -s /etc/nginx/sites-available/soy-nv-ai /etc/nginx/sites-enabled/ | |
| rm /etc/nginx/sites-enabled/default # μ νμ¬ν | |
| # ν μ€νΈ λ° μ¬μμ | |
| nginx -t | |
| systemctl restart nginx | |
| ``` | |
| ## 7λ¨κ³: SSL μ€μ (λλ©μΈ μλ κ²½μ°) | |
| ```bash | |
| certbot --nginx -d YOUR_DOMAIN.com -d www.YOUR_DOMAIN.com | |
| ``` | |
| ## 8λ¨κ³: λ°°ν¬ μ€ν¬λ¦½νΈ μ€ν (μ νμ¬ν) | |
| ```bash | |
| chmod +x deploy.sh | |
| ./deploy.sh | |
| ``` | |
| ## μλ£! | |
| μΉμ¬μ΄νΈ μ μ: | |
| - HTTP: http://YOUR_SERVER_IP | |
| - HTTPS: https://YOUR_DOMAIN.com (SSL μ€μ ν) | |
| ## λ¬Έμ ν΄κ²° | |
| ```bash | |
| # μλΉμ€ λ‘κ·Έ | |
| journalctl -u soy-nv-ai -f | |
| # Nginx λ‘κ·Έ | |
| tail -f /var/log/nginx/soy-nv-ai-error.log | |
| # μλΉμ€ μ¬μμ | |
| systemctl restart soy-nv-ai | |
| systemctl restart nginx | |
| ``` | |
| ## μ μ©ν λͺ λ Ήμ΄ | |
| ```bash | |
| # μλΉμ€ κ΄λ¦¬ | |
| systemctl start/stop/restart/status soy-nv-ai | |
| # λ‘κ·Έ νμΈ | |
| journalctl -u soy-nv-ai -n 50 -f | |
| # νλ‘μΈμ€ νμΈ | |
| ps aux | grep python | |
| htop | |
| # λμ€ν¬ νμΈ | |
| df -h | |
| ``` | |