راهنمای نصب

نیازمندی‌های سیستم

  • رم: ۶۴ مگابایت حداقل (۲۵۶ مگابایت توصیه می‌شود)
  • پردازنده: ۰.۲۵ vCPU حداقل
  • فضای ذخیره‌سازی: ۱ گیگابایت حداقل
  • سیستم‌عامل: Linux، macOS، Windows یا سیستم‌های مبتنی بر ARM

روش ۱: نصب باینری (توصیه می‌شود)

دانلود

به انتشارات گیتی‌یار بروید و باینری مناسب پلتفرم خود را دانلود کنید.

Linux/macOS

# دانلود
wget https://github.com/gityar/gityar/releases/latest/download/gityar-linux-amd64

# قابل اجرا کردن
chmod +x gityar-linux-am64

# اجرا
./gityar-linux-amd64 web

Windows

  1. فایل gityar-windows-amd64.exe را دانلود کنید
  2. برای اجرا دابل‌کلیک کنید

روش ۲: نصب با Docker

دریافت Image

docker pull gityar/gityar:latest

اجرای Container

docker run -d \
  --name gityar \
  -p 3000:3000 \
  -v /path/to/gityar-data:/data \
  gityar/gityar:latest

Docker Compose

فایل docker-compose.yml بسازید:

version: '3'
services:
  gityar:
    image: gityar/gityar:latest
    container_name: gityar
    ports:
      - "3000:3000"
    volumes:
      - ./gityar-data:/data
    restart: always

اجرا کنید:

docker-compose up -d

روش ۳: ساخت از سورس کد

پیش‌نیازها

  • Go 1.21 یا بالاتر
  • Git

ساخت

# Clone مخزن
git clone https://github.com/gityar/gityar.git
cd gityar

# ساخت
go build -o gityar ./cmd/gityar

# اجرا
./gityar web

راه‌اندازی اولیه

  1. شروع گیتی‌یار:

    ./gityar web
    
  2. باز کردن مرورگر: به http://localhost:3000 بروید

  3. تکمیل wizard نصب:

    • تنظیمات دیتابیس (SQLite، MySQL، PostgreSQL)
    • تنظیمات برنامه
    • حساب ادمین
  4. شروع استفاده از گیتی‌یار!

پیکربندی دیتابیس

SQLite (پیش‌فرض)

نیاز به پیکربندی اضافی نیست.

MySQL

[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gityar
USER = gityar
PASSWD = password

PostgreSQL

[database]
DB_TYPE = postgres
HOST = 127.0.0.1:5432
NAME = gityar
USER = gityar
PASSWD = password
SSL_MODE = disable

Reverse Proxy

Nginx

server {
    listen 80;
    server_name gityar.example.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

Apache

<VirtualHost *:80>
    ServerName gityar.example.com
    
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/
</VirtualHost>

مراحل بعدی