Skip to content

Commit

Permalink
Fixes #3, adds support to change upload_max_filesize and memory_limit…
Browse files Browse the repository at this point in the history
… via env declarations
  • Loading branch information
aschmelyun committed Mar 31, 2023
1 parent b19406a commit 18327e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ FROM php:8.2-alpine

RUN touch /usr/local/etc/php/php.ini

RUN echo "memory_limit = 512M" >> /usr/local/etc/php/php.ini
RUN echo "upload_max_filesize = 128M" >> /usr/local/etc/php/php.ini
RUN echo "post_max_size = 128M" >> /usr/local/etc/php/php.ini

RUN apk add --no-cache ffmpeg

ADD ./src /var/www/html
Expand Down
12 changes: 12 additions & 0 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,20 @@ if [ -z "$OPENAI_API_KEY" ]; then
exit 1
fi

if [ -z "$UPLOAD_MAX_SIZE" ]; then
UPLOAD_MAX_SIZE="256M"
fi

if [ -z "$MEMORY_LIMIT" ]; then
MEMORY_LIMIT="512M"
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

php artisan key:generate

php artisan migrate:fresh --force
Expand Down

0 comments on commit 18327e8

Please sign in to comment.