Update for Docker Hub deployment - users can now pull pre-built image

This commit is contained in:
Iulian 2025-12-16 23:53:42 +00:00
parent 51679d1943
commit a36352bfcf
3 changed files with 206 additions and 19 deletions

165
DEPLOYMENT.md Normal file
View file

@ -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!**

View file

@ -38,37 +38,59 @@
- Dual-core CPU (quad-core recommended) - Dual-core CPU (quad-core recommended)
- Storage space for your audio library - 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 ```bash
git clone https://github.com/yourusername/soundwave.git wget https://raw.githubusercontent.com/aiulian25/soundwave/main/docker-compose.yml
cd soundwave
``` ```
### 2. Create Environment File **2. Create .env file**
```bash ```bash
cp .env.example .env cat > .env << EOF
# Edit .env if you want to change default credentials SW_HOST=http://localhost:8889
# Default: admin / soundwave SW_USERNAME=admin
SW_PASSWORD=soundwave
ELASTIC_PASSWORD=soundwave
REDIS_HOST=soundwave-redis
TZ=UTC
EOF
``` ```
### 3. Start the Application **3. Start SoundWave**
```bash ```bash
docker compose up -d 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 **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 ### First-Time Setup

View file

@ -3,7 +3,7 @@
services: services:
soundwave: soundwave:
container_name: soundwave container_name: soundwave
build: . image: aiulian25/soundwave:latest
ports: ports:
- "8889:8888" - "8889:8888"
volumes: volumes: