Skip to content

Commit

Permalink
Documentation improved
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmccartney committed Nov 16, 2023
1 parent a25d71d commit 1008d81
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/logs
/node_modules
.DS_Store

# Exclude FFmpeg logs
/*.temp
/*.log

# Logs
/logs/*
!/logs/.gitkeep

# Media
/data/media/*
!/data/media/.gitkeep
Expand Down
8 changes: 8 additions & 0 deletions docs/pages/installation/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ If you believe a library has been included in the build distrubuted version in e

For production you should make sure that the source code is not mounted into the container. If the NODE_ENV option is set it should be set to `production`. This is the default if it is not set.

### Command Line

```
docker buildx build --build-arg NON_FREE=true --platform=linux/amd64 -t ffmpeg-docker:latest .
```

### Docker Compose

A sample `docker-compose.yml` file for production is shown below;

```
Expand Down
27 changes: 27 additions & 0 deletions docs/pages/installation/environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: page
title: Environment Variables
parent: Installation
nav_order: 2
---

# Environment Variables

Docker image environment variables are given below

| Variable | Default | Required | Type | Description |
| ------------- | -------------- | -------- | ------- | ---------------------------------------------------------------------------------- |
| PORT | 80 | No | Integer | Port that the backend API runs on |
| HOST | localhost | No | String | |
| RATE_LIMIT | 1000 | No | Integer | The number of requests allowed per client to the API in a 5 minute windows |
| NODE_ENV | production | No | String | Options are "production" or "development" |
| WEB_GUI | true | No | Boolean | Determines whether the API runs a simple frontend or not |
| AUTH_ENABLE | false | No | Boolean | Use JWT auth for API |
| AUTH_USER | admin | No | String | Auth username for login |
| AUTH_PASSWORD | ffmp3gap1 | No | String | Auth password for login |
| AUTH_KEY | averysecretkey | No | String | Private key for generating JWT tokens. Change this if you're using authentication |
| MEDIA_PATH | ./data/media | No | String | Directory to keep media in. Useful to change if media is stored in a network share |
| QUEUE_SZIE | 5 | No | Integer | Number of FFMpeg processes that can run simultaneously |
| LOG_FOLDER | logs | No | String | Folder that logs are stored in |
| LOG_NAME | ffmpeg | No | String | Log file names |
| LOG_LEVEL | info | No | String | Logging level "debug", "error", "info", "http" or "warning" |
Empty file added logs/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion utils/jobManager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const crypto = require("crypto");

let maxQueueSize = process.env.QUEUE_SZIE | 5;
let maxQueueSize = process.env.QUEUE_SZIE || 5;
let jobs = {};

const start = (output, name = "FFmpeg Process", type = ["default"]) => {
Expand Down

0 comments on commit 1008d81

Please sign in to comment.