Skip to content

Commit

Permalink
Made fixes for Laravel11 upgrade, Updated docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Apr 9, 2024
1 parent 64b05f6 commit 8d5c2b7
Show file tree
Hide file tree
Showing 6 changed files with 457 additions and 371 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion config/session.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
|
*/

'driver' => env('SESSION_DRIVER', 'database'),
'driver' => 'file',

/*
|--------------------------------------------------------------------------
Expand Down
9 changes: 7 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,24 @@ WORKDIR /app
ARG DEBIAN_FRONTEND=noninteractive
RUN set -xe && \
apt-get update -yqq && \
apt-get install curl supervisor nginx cron php8.1-cli php8.1-fpm php8.1-cgi php8.1-common \
php8.1-curl php8.1-mbstring php8.1-xml php8.1-zip php8.1-gd php8.1-sqlite3 php8.1-bcmath -yqq
apt-get install software-properties-common curl supervisor nginx cron -yqq && \
add-apt-repository ppa:ondrej/php && \
apt-get update -yqq && \
apt-get install php8.3-cli php8.3-fpm php8.3-cgi php8.3-common php8.3-curl php8.3-mbstring \
php8.3-xml php8.3-zip php8.3-gd php8.3-sqlite3 php8.3-bcmath -yqq

# Copy requirements from other containers
COPY --from=0 /app/public/build /app/public/build
COPY --from=1 /app/vendor /app/vendor

# Make required files changes using passed-though files
# Then create directory for PHP-FPM socket
# Then setup crontab
# Then run any app-side commands
RUN cp docker/.env.container /app/.env && \
cp docker/nginx.conf /etc/nginx/sites-enabled/rss.conf && \
rm /etc/nginx/sites-enabled/default && \
mkdir /run/php && \
chmod +x /app/docker/run.sh && \
crontab -u www-data /app/docker/cron && \
php artisan key:generate && \
Expand Down
2 changes: 1 addition & 1 deletion docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ server {
error_page 404 /index.php;

location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
Expand Down
3 changes: 2 additions & 1 deletion docker/services.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[supervisord]
nodaemon=true
user=root

[program:cron]
command=cron -f
Expand All @@ -20,7 +21,7 @@ stopasgroup=true
killasgroup=true

[program:php-fpm]
command=/usr/sbin/php-fpm8.1 -F
command=/usr/sbin/php-fpm8.3 -F
autorestart=true
redirect_stderr=true
stdout_logfile=/dev/stdout
Expand Down
Loading

0 comments on commit 8d5c2b7

Please sign in to comment.