diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md new file mode 100644 index 0000000..5f81454 --- /dev/null +++ b/DEPLOYMENT.md @@ -0,0 +1,165 @@ +# 🚀 SoundWave - Easy Deployment Guide + +## For End Users (No Build Required) + +### Quick Start (3 Steps) + +**1. Download docker-compose.yml** +```bash +wget https://raw.githubusercontent.com/aiulian25/soundwave/main/docker-compose.yml +``` + +**2. Create .env file** +```bash +cat > .env << EOF +SW_HOST=http://localhost:8889 +SW_USERNAME=admin +SW_PASSWORD=soundwave +ELASTIC_PASSWORD=soundwave +REDIS_HOST=soundwave-redis +TZ=UTC +EOF +``` + +**3. Start SoundWave** +```bash +docker compose up -d +``` + +That's it! 🎉 + +**Access:** http://localhost:8889 +**Login:** admin / soundwave + +--- + +## What This Does + +The Docker Compose file: +- ✅ Pulls pre-built image from Docker Hub (`aiulian25/soundwave:latest`) +- ✅ Starts ElasticSearch for search functionality +- ✅ Starts Redis for task queue +- ✅ Automatically runs migrations +- ✅ Creates admin user + +**No npm, no build, no compilation needed!** + +--- + +## Directory Structure + +After running, you'll have: +``` +your-folder/ +├── docker-compose.yml (downloaded) +├── .env (created) +├── audio/ (created automatically) +├── cache/ (created automatically) +├── data/ (created automatically) +├── es/ (created automatically) +└── redis/ (created automatically) +``` + +--- + +## Customization + +Edit `.env` before starting to customize: +- Change port from 8889 to something else +- Change admin username/password +- Adjust timezone + +Example custom .env: +```bash +SW_HOST=http://localhost:3000 +SW_USERNAME=myadmin +SW_PASSWORD=mysecretpassword +ELASTIC_PASSWORD=elasticpass +REDIS_HOST=soundwave-redis +TZ=America/New_York +``` + +Then update port in docker-compose.yml: +```yaml +ports: + - "3000:8888" # Change 8889 to 3000 +``` + +--- + +## Stopping/Starting + +```bash +# Stop +docker compose down + +# Start +docker compose up -d + +# View logs +docker compose logs -f soundwave + +# Restart +docker compose restart soundwave +``` + +--- + +## Updating + +```bash +# Pull latest image +docker compose pull + +# Restart with new version +docker compose up -d +``` + +--- + +## For Developers + +If you want to build from source: +```bash +git clone https://github.com/aiulian25/soundwave.git +cd soundwave +cd frontend && npm install && npm run build && cd .. +docker compose build +docker compose up -d +``` + +--- + +## System Requirements + +- Docker & Docker Compose +- 2-4GB RAM +- Dual-core CPU (quad-core recommended) +- Storage for your audio library + +--- + +## Troubleshooting + +**Port already in use?** +```bash +# Change port in .env and docker-compose.yml +ports: + - "9000:8888" # Use port 9000 instead +``` + +**Can't access after starting?** +```bash +# Wait 30-60 seconds for services to initialize +docker compose logs -f soundwave +``` + +**Forgot password?** +```bash +# Reset admin password +docker compose exec soundwave python manage.py changepassword admin +``` + +--- + +✨ **That's it! Enjoy SoundWave!** diff --git a/README.md b/README.md index 9f4c7f7..553d58d 100644 --- a/README.md +++ b/README.md @@ -38,37 +38,59 @@ - Dual-core CPU (quad-core recommended) - Storage space for your audio library -## 🚀 Quick Start +## 🚀 Quick Start (For End Users) -### 1. Clone the Repository +### Option 1: Pull Pre-Built Image (Recommended) +**1. Download docker-compose.yml** ```bash -git clone https://github.com/yourusername/soundwave.git -cd soundwave +wget https://raw.githubusercontent.com/aiulian25/soundwave/main/docker-compose.yml ``` -### 2. Create Environment File - +**2. Create .env file** ```bash -cp .env.example .env -# Edit .env if you want to change default credentials -# Default: admin / soundwave +cat > .env << EOF +SW_HOST=http://localhost:8889 +SW_USERNAME=admin +SW_PASSWORD=soundwave +ELASTIC_PASSWORD=soundwave +REDIS_HOST=soundwave-redis +TZ=UTC +EOF ``` -### 3. Start the Application - +**3. Start SoundWave** ```bash docker compose up -d ``` -That's it! The application will: -- Pull/build all necessary images -- Start ElasticSearch and Redis -- Start the SoundWave application -- Run database migrations automatically - **Access:** http://localhost:8889 -**Default credentials:** admin / soundwave +**Login:** admin / soundwave + +The pre-built image is hosted on Docker Hub at `aiulian25/soundwave:latest` + +### Option 2: Build From Source (For Developers) + +**1. Clone the Repository** +```bash +git clone https://github.com/aiulian25/soundwave.git +cd soundwave +``` + +**2. Build Frontend** +```bash +cd frontend +npm install +npm run build +cd .. +``` + +**3. Start with Docker** +```bash +# Edit docker-compose.yml to use "build: ." instead of "image: aiulian25/soundwave:latest" +docker compose build +docker compose up -d +``` ### First-Time Setup diff --git a/docker-compose.yml b/docker-compose.yml index a761dca..fabeab9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: soundwave: container_name: soundwave - build: . + image: aiulian25/soundwave:latest ports: - "8889:8888" volumes: