From ec8c7045b145d727cd803ef26ef89a6599358c0d Mon Sep 17 00:00:00 2001 From: Andrew Schmelyun Date: Fri, 31 Mar 2023 01:51:59 -0400 Subject: [PATCH] Adjusts README, changes UPLOAD_MAX_SIZE to UPLOAD_MAX_FILESIZE --- README.md | 8 ++++++++ startup.sh | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4fc2c02..baf777f 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,14 @@ Your video is sent to an API where the audio is extracted from it using FFMpeg, If you chose to select chapters or a summary, that transcript is then sent to a **ChatGPT model** for processing into concise chapters of the length you wanted, and a brief summary that would fit in something like a YouTube description. +## Configuration + +You can adjust a few parameters in the container by passing in [environment variables](https://docs.docker.com/engine/reference/commandline/run/#env) with your command using additional `-e` flags. Here are the current ones you can add: + +- `OPENAI_API_KEY` **(required)** - Sets the key responsible for communication with OpenAI's APIs. No default. +- `UPLOAD_MAX_FILESIZE` - Changes PHP's UPLOAD_MAX_FILESIZE setting. Default: `256M` +- `MEMORY_LIMIT` - Changes PHP's MEMORY_LIMIT setting. Default: `512M` + ## Starting from source Alternative, if you have **PHP 8.1+** and **npm** installed on your local machine, you can boot the application up directly from the source code instead. diff --git a/startup.sh b/startup.sh index 8c41b80..9ef18ce 100644 --- a/startup.sh +++ b/startup.sh @@ -5,8 +5,8 @@ if [ -z "$OPENAI_API_KEY" ]; then exit 1 fi -if [ -z "$UPLOAD_MAX_SIZE" ]; then - UPLOAD_MAX_SIZE="256M" +if [ -z "$UPLOAD_MAX_FILESIZE" ]; then + UPLOAD_MAX_FILESIZE="256M" fi if [ -z "$MEMORY_LIMIT" ]; then @@ -16,8 +16,8 @@ fi echo "OPENAI_API_KEY=$OPENAI_API_KEY" >> .env echo "memory_limit = $MEMORY_LIMIT" >> /usr/local/etc/php/php.ini -echo "upload_max_filesize = $UPLOAD_MAX_SIZE" >> /usr/local/etc/php/php.ini -echo "post_max_size = $UPLOAD_MAX_SIZE" >> /usr/local/etc/php/php.ini +echo "upload_max_filesize = $UPLOAD_MAX_FILESIZE" >> /usr/local/etc/php/php.ini +echo "post_max_size = $UPLOAD_MAX_FILESIZE" >> /usr/local/etc/php/php.ini php artisan key:generate