feat: add automated 1-click installation script and update setup documentation
This commit is contained in:
@@ -57,14 +57,21 @@ Neta is designed to be easily self-hosted. Follow these steps to deploy the appl
|
|||||||
- Node.js (for local development)
|
- Node.js (for local development)
|
||||||
- A Supabase instance (Cloud or Self-Hosted)
|
- A Supabase instance (Cloud or Self-Hosted)
|
||||||
|
|
||||||
### Setup Instructions
|
### 1-Click Installation (Recommended)
|
||||||
|
|
||||||
1. Clone the repository to your local machine or server.
|
You can install and start Neta immediately using our automated setup script. Simply run the following command in your terminal:
|
||||||
2. Copy the `.env.example` file to `.env.local` and populate the variables with your Supabase credentials.
|
|
||||||
3. Run the database migrations located in `supabase/migrations` against your PostgreSQL database to set up the schemas, policies, and functions.
|
|
||||||
4. Build and start the Docker container using the provided `docker-compose.yml` or `Dockerfile`.
|
|
||||||
|
|
||||||
Example deployment command:
|
```bash
|
||||||
|
curl -sL https://raw.githubusercontent.com/poyrazavsever/neta/main/install.sh | bash
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual Installation
|
||||||
|
|
||||||
|
If you prefer to set up Neta manually:
|
||||||
|
|
||||||
|
1. Clone the repository: `git clone https://github.com/poyrazavsever/neta.git`
|
||||||
|
2. Navigate to the directory and copy the `.env.example` file to `.env.local`.
|
||||||
|
3. Build and start the Docker container:
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d --build
|
docker-compose up -d --build
|
||||||
```
|
```
|
||||||
|
|||||||
+57
@@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Neta - Freelancer Operating System Installation Script
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "🚀 Neta kurulumu başlıyor..."
|
||||||
|
|
||||||
|
# 1. Check for Git
|
||||||
|
if ! [ -x "$(command -v git)" ]; then
|
||||||
|
echo "Hata: Git yüklü değil. Lütfen önce Git'i kurun." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 2. Check for Docker
|
||||||
|
if ! [ -x "$(command -v docker)" ]; then
|
||||||
|
echo "Hata: Docker yüklü değil. Lütfen önce Docker'ı kurun." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 3. Target directory
|
||||||
|
TARGET_DIR="neta-os"
|
||||||
|
|
||||||
|
if [ -d "$TARGET_DIR" ]; then
|
||||||
|
echo "Hata: '$TARGET_DIR' dizini zaten var. Lütfen farklı bir dizinde deneyin veya mevcut dizini silin." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 4. Clone repository
|
||||||
|
echo "📦 GitHub'dan kodlar indiriliyor..."
|
||||||
|
git clone https://github.com/poyrazavsever/neta.git "$TARGET_DIR"
|
||||||
|
cd "$TARGET_DIR"
|
||||||
|
|
||||||
|
# 5. Setup environment variables
|
||||||
|
echo "⚙️ Çevresel değişkenler ayarlanıyor..."
|
||||||
|
if [ -f ".env.example" ]; then
|
||||||
|
cp .env.example .env.local
|
||||||
|
else
|
||||||
|
echo "Uyarı: .env.example dosyası bulunamadı."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 6. Start with Docker Compose
|
||||||
|
echo "🐳 Docker container'ları inşa ediliyor ve başlatılıyor..."
|
||||||
|
if docker compose version > /dev/null 2>&1; then
|
||||||
|
docker compose up -d --build
|
||||||
|
elif docker-compose version > /dev/null 2>&1; then
|
||||||
|
docker-compose up -d --build
|
||||||
|
else
|
||||||
|
echo "Hata: docker-compose komutu bulunamadı." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "✅ Kurulum tamamlandı!"
|
||||||
|
echo "Neta başarıyla ayağa kaldırıldı."
|
||||||
|
echo "Tarayıcınızdan http://localhost:3000 adresine giderek Neta'yı kullanmaya başlayabilirsiniz."
|
||||||
|
echo "İlk girişte oluşturacağınız hesap, sistemin tek yöneticisi (admin) olacaktır."
|
||||||
Reference in New Issue
Block a user