Fixed misc bugs
This commit is contained in:
@@ -44,6 +44,12 @@ This guide covers running the BDFR Web Interface with full BDFR backend support
|
||||
Create a `.env` file in the project root with the following variables:
|
||||
|
||||
```env
|
||||
# Docker User Configuration (Important for file permissions)
|
||||
# Set these to match your host user's UID/GID to avoid permission issues
|
||||
# Find your UID/GID by running: id (on Linux/Mac) or wsl id (on Windows WSL)
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
|
||||
# Reddit OAuth Configuration (Required for authenticated features)
|
||||
BDFR_CLIENT_ID=your_client_id_here
|
||||
BDFR_CLIENT_SECRET=your_client_secret_here
|
||||
@@ -74,7 +80,7 @@ The Docker setup uses two volume mounts:
|
||||
|
||||
| Host Path | Container Path | Purpose |
|
||||
|-----------|----------------|---------|
|
||||
| `./downloads` | `/downloads` | All Reddit downloads are stored here |
|
||||
| `./downloads` | `/app/downloads` | All Reddit downloads are stored here |
|
||||
| `./data` | `/app/data` | SQLite databases, scheduled tasks, and BDFR configuration |
|
||||
|
||||
**Data Directory Structure:**
|
||||
@@ -139,22 +145,22 @@ docker exec -it bdfr-web-interface bash
|
||||
**Run BDFR commands:**
|
||||
```bash
|
||||
# Download from a subreddit
|
||||
bdfr download /downloads --subreddit Python -L 10
|
||||
bdfr download /app/downloads --subreddit Python -L 10
|
||||
|
||||
# Download from a user
|
||||
bdfr download /downloads --user reddituser --submitted -L 100
|
||||
bdfr download /app/downloads --user reddituser --submitted -L 100
|
||||
|
||||
# Archive posts
|
||||
bdfr archive /downloads --subreddit all -L 500
|
||||
bdfr archive /app/downloads --subreddit all -L 500
|
||||
|
||||
# Clone (download + archive)
|
||||
bdfr clone /downloads --subreddit EarthPorn -L 50
|
||||
bdfr clone /app/downloads --subreddit EarthPorn -L 50
|
||||
```
|
||||
|
||||
**One-line BDFR commands:**
|
||||
```bash
|
||||
# Download without entering the container
|
||||
docker exec bdfr-web-interface bdfr download /downloads --subreddit Python -L 10
|
||||
docker exec bdfr-web-interface bdfr download /app/downloads --subreddit Python -L 10
|
||||
|
||||
# View BDFR version
|
||||
docker exec bdfr-web-interface bdfr --version
|
||||
@@ -185,7 +191,7 @@ Mount a different host directory for downloads:
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
- /path/to/your/downloads:/downloads
|
||||
- /path/to/your/downloads:/app/downloads
|
||||
- ./data:/app/data
|
||||
```
|
||||
|
||||
@@ -251,7 +257,29 @@ docker-compose up -d
|
||||
|
||||
### Permission Issues
|
||||
|
||||
If you encounter permission errors with volumes:
|
||||
If you encounter permission errors with volumes (e.g., "Permission denied" when creating directories):
|
||||
|
||||
**Solution 1: Configure PUID/PGID (Recommended)**
|
||||
|
||||
Set `PUID` and `PGID` in your `.env` file to match your host user:
|
||||
|
||||
```bash
|
||||
# Find your UID and GID
|
||||
id
|
||||
|
||||
# Example output: uid=1001(username) gid=1001(groupname)
|
||||
# Add to .env file:
|
||||
PUID=1001
|
||||
PGID=1001
|
||||
```
|
||||
|
||||
Then restart the container:
|
||||
```bash
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
**Solution 2: Fix Host Directory Permissions**
|
||||
|
||||
**Linux/Mac:**
|
||||
```bash
|
||||
@@ -259,9 +287,18 @@ sudo chown -R $USER:$USER downloads data config
|
||||
chmod -R 755 downloads data config
|
||||
```
|
||||
|
||||
**TrueNAS/NAS Systems:**
|
||||
When using network shares or NAS storage:
|
||||
1. Find your NAS user's UID/GID (usually in user management settings)
|
||||
2. Set `PUID` and `PGID` in `.env` to match your NAS user
|
||||
3. Ensure the NAS user has read/write permissions on mounted shares
|
||||
|
||||
**Windows:**
|
||||
Ensure Docker Desktop has access to the drive where the project is located (Settings → Resources → File Sharing).
|
||||
|
||||
**Why this matters:**
|
||||
The container runs as a specific user (default UID 1000). If your host directories are owned by a different user, the container won't be able to write to them. Setting `PUID` and `PGID` tells Docker to run the container as your host user, matching permissions.
|
||||
|
||||
### Downloads Not Appearing
|
||||
|
||||
1. Check volume mounts are correct:
|
||||
@@ -271,7 +308,7 @@ Ensure Docker Desktop has access to the drive where the project is located (Sett
|
||||
|
||||
2. Verify download directory inside container:
|
||||
```bash
|
||||
docker exec bdfr-web-interface ls -la /downloads
|
||||
docker exec bdfr-web-interface ls -la /app/downloads
|
||||
```
|
||||
|
||||
3. Check container logs for errors:
|
||||
|
||||
Reference in New Issue
Block a user