Skip to content

Commit

Permalink
Adjusts README, changes UPLOAD_MAX_SIZE to UPLOAD_MAX_FILESIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmelyun committed Mar 31, 2023
1 parent 18327e8 commit ec8c704
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit ec8c704

Please sign in to comment.