Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM node:18

# Add standard Docker labels
LABEL org.opencontainers.image.title="BasicYTDLGUI"
LABEL org.opencontainers.image.description="A simple GUI for yt-dlp with playlist support and quality presets"
LABEL org.opencontainers.image.source="https://github.com/alexp/basicYTDLGUI"
LABEL org.opencontainers.image.licenses="MIT"

# Install yt-dlp and its dependencies
RUN apt-get update && apt-get install -y \
python3 \
Expand All @@ -15,16 +21,23 @@ WORKDIR /usr/src/app
COPY package*.json ./

# Install dependencies
RUN npm install
RUN npm ci --only=production

# Copy app source
COPY . .

# Create downloads directory
RUN mkdir -p downloads
RUN mkdir -p downloads && \
chown -R node:node /usr/src/app

# Switch to non-root user
USER node

# Expose port
EXPOSE 3000

# Set environment variables
ENV NODE_ENV=production

# Start the application
CMD ["node", "server.js"]
50 changes: 49 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,74 @@ Then open http://localhost:3000 in your browser.

## 🐳 Docker

### Using Official Image

```bash
# Pull the official image
docker pull ghcr.io/developedbyalex/basicytdlgui:latest

# Run the container
docker run -d \
--name basicytdlgui \
-p 3000:3000 \
-v $(pwd)/downloads:/usr/src/app/downloads \
ghcr.io/developedbyalex/basicytdlgui:latest
```

### Using Docker Compose (Recommended)

Create a `docker-compose.yml` file:

```yaml
version: '3.8'
services:
app:
image: ghcr.io/developedbyalex/basicytdlgui:latest
ports:
- "3000:3000"
volumes:
- ./downloads:/usr/src/app/downloads
restart: unless-stopped
```

Then run:

```bash
# Build and start containers
docker-compose up -d

# View logs
docker-compose logs -f

# Stop containers
docker-compose down
```

### Manual Docker Build

Build from source if you want to customize the image:

```bash
# Build the image
docker build -t basicytdlgui .

# Run the container
docker run -p 3000:3000 -v $(pwd)/downloads:/usr/src/app/downloads basicytdlgui
docker run -d \
--name basicytdlgui \
-p 3000:3000 \
-v $(pwd)/downloads:/usr/src/app/downloads \
basicytdlgui
```

### Docker Tips

- The downloads directory is persisted through a volume mount
- Access the web interface at http://localhost:3000
- Use `docker logs -f basicytdlgui` to view real-time logs
- Use `docker stats basicytdlgui` to monitor container resources
- Set custom port: `-p 8080:3000` (access on port 8080)
- Set custom download directory: `-v /path/to/downloads:/usr/src/app/downloads`

## 📖 Usage

1. Enter one or more video URLs (one per line)
Expand Down
16 changes: 16 additions & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions node_modules/.bin/mime.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions node_modules/.bin/mime.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading