Skip to content

Commit 9808a57

Browse files
Merge pull request #8 from robsontenorio/8.4
wip: 8.4
2 parents 47b8228 + 31de299 commit 9808a57

File tree

7 files changed

+46
-43
lines changed

7 files changed

+46
-43
lines changed

.github/workflows/docker-publish.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,39 @@ jobs:
1515
uses: actions/checkout@v2
1616

1717
- name: Set up QEMU
18-
uses: docker/setup-qemu-action@v1
18+
uses: docker/setup-qemu-action@v3
1919

2020
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v1
21+
uses: docker/setup-buildx-action@v3
2222

2323
- name: Login to DockerHub
24-
uses: docker/login-action@v1
24+
uses: docker/login-action@v3
2525
with:
2626
username: ${{ secrets.DOCKERHUB_USERNAME }}
2727
password: ${{ secrets.DOCKERHUB_TOKEN }}
2828

2929
- name: Docker meta
3030
id: meta
31-
uses: docker/metadata-action@v3
31+
uses: docker/metadata-action@v5
3232
with:
3333
images: robsontenorio/laravel
3434
flavor: latest=false
3535
tags: |
3636
type=ref,event=tag
37-
type=raw,enable=${{ github.ref == 'refs/heads/master' }},value=latest
38-
37+
type=raw,enable=${{ github.ref == 'refs/heads/master' }},value=latest
38+
3939
- name: Build and push
40-
uses: docker/build-push-action@v2
40+
uses: docker/build-push-action@v6
4141
with:
4242
context: .
4343
platforms: linux/amd64,linux/arm64
4444
push: true
4545
tags: ${{ steps.meta.outputs.tags }}
46-
46+
4747
- name: Docker Hub Description
48-
uses: peter-evans/dockerhub-description@v2
48+
uses: peter-evans/dockerhub-description@v4
4949
with:
5050
username: ${{ secrets.DOCKERHUB_USERNAME }}
5151
password: ${{ secrets.DOCKERHUB_PASSWORD }}
5252
repository: robsontenorio/laravel
5353
short-description: ${{ github.event.repository.description }}
54-
55-

Dockerfile

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:24.04
22

33
LABEL maintainer="Robson Tenório"
44
LABEL site="https://github.com/robsontenorio/laravel-docker"
55

66
ENV TZ=UTC
77
ENV LANG="C.UTF-8"
88
ENV DEBIAN_FRONTEND=noninteractive
9-
ENV CONTAINER_ROLE=${CONTAINER_ROLE:-APP}
9+
ARG CONTAINER_ROLE=APP
10+
ENV CONTAINER_ROLE=${CONTAINER_ROLE}
1011

1112
WORKDIR /var/www/app
1213

1314
RUN apt update \
14-
# Add PHP 8.3 repository
15+
# Add PHP 8.4 repository
1516
&& apt install -y software-properties-common && add-apt-repository ppa:ondrej/php \
1617
# PHP extensions
1718
&& apt install -y \
18-
php8.3-bcmath \
19-
php8.3-cli \
20-
php8.3-curl \
21-
php8.3-fpm \
22-
php8.3-gd \
23-
php8.3-intl \
24-
php8.3-mbstring \
25-
php8.3-mysql \
26-
php8.3-redis \
27-
php8.3-sockets \
28-
php8.3-sqlite3 \
29-
php8.3-pcov \
30-
php8.3-pgsql \
31-
php8.3-opcache \
32-
php8.3-xml \
33-
php8.3-zip \
19+
php8.4-bcmath \
20+
php8.4-cli \
21+
php8.4-curl \
22+
php8.4-fpm \
23+
php8.4-gd \
24+
php8.4-intl \
25+
php8.4-mbstring \
26+
php8.4-mysql \
27+
php8.4-redis \
28+
php8.4-sockets \
29+
php8.4-sqlite3 \
30+
php8.4-pcov \
31+
php8.4-pgsql \
32+
php8.4-opcache \
33+
php8.4-xml \
34+
php8.4-zip \
3435
# Extra
3536
curl \
3637
git \
38+
gnupg \
3739
htop \
3840
nano \
3941
nginx \
@@ -52,14 +54,15 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin
5254
# Node, NPM, Yarn
5355
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && apt install -y nodejs && npm -g install yarn --unsafe-perm
5456

55-
# Create user/group with id/uid (1000/100)
56-
RUN groupadd -g 1000 appuser
57+
# Create user/group with id/uid (1000/1000)
58+
RUN userdel ubuntu
59+
RUN groupadd -f -g 1000 appuser
5760
RUN useradd -u 1000 -m -d /home/appuser -g appuser appuser
5861

5962
# Config files
6063
COPY --chown=appuser:appuser start.sh /usr/local/bin/start
6164
COPY --chown=appuser:appuser config/etc /etc
62-
COPY --chown=appuser:appuser config/etc/php/8.3/cli/conf.d/y-php.ini /etc/php/8.3/fpm/conf.d/y-php.ini
65+
COPY --chown=appuser:appuser config/etc/php/8.4/cli/conf.d/y-php.ini /etc/php/8.4/fpm/conf.d/y-php.ini
6366

6467
# Permissions for start script
6568
RUN chmod a+x /usr/local/bin/start
@@ -88,4 +91,4 @@ RUN echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.zshrc
8891
EXPOSE 8080 8000 3000 3001 9515 9773
8992

9093
# Start services through "supervisor" based on "CONTAINER_ROLE". See "start.sh".
91-
CMD /usr/local/bin/start
94+
CMD ["/usr/local/bin/start"]

config/etc/nginx/sites-available/default

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ server {
2626

2727
# PHP
2828
location ~ \.php$ {
29-
fastcgi_pass unix:/home/appuser/php8.3-fpm.sock;
29+
fastcgi_pass unix:/home/appuser/php8.4-fpm.sock;
3030
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
3131
include fastcgi_params;
32+
fastcgi_buffers 16 16k;
33+
fastcgi_buffer_size 32k;
3234
}
3335

3436
# Prevent access "." files

config/etc/php/8.3/fpm/pool.d/y-www.conf renamed to config/etc/php/8.4/fpm/pool.d/y-www.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ user = appuser
44
group = appuser
55
listen.owner = appuser
66
listen.group = appuser
7-
listen = /home/appuser/php8.3-fpm.sock
7+
listen = /home/appuser/php8.4-fpm.sock
88
clear_env = no
99

1010
; fpm tuning

config/etc/supervisor/conf.d-temp/php-fpm.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP FPM
22
[program:php-fpm]
3-
command=php-fpm8.3 -F
3+
command=php-fpm8.4 -F
44
stdout_logfile=/dev/stdout
55
stdout_logfile_maxbytes=0
66
stderr_logfile=/dev/stderr

databases/sqlserver.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ set -e
55
# SQLSERVER DRIVERS + TOOLS #
66
##################################################
77

8-
apt install -y php8.3-dev unixodbc-dev
8+
apt install -y php8.4-dev unixodbc-dev wget
99

10-
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
11-
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
10+
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
11+
wget -qO- https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
1212
apt update
1313
ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools18
1414

1515
pecl channel-update pecl.php.net
1616
pecl install sqlsrv pdo_sqlsrv
17-
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.3/mods-available/sqlsrv.ini
18-
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.3/mods-available/pdo_sqlsrv.ini
17+
printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.4/mods-available/sqlsrv.ini
18+
printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.4/mods-available/pdo_sqlsrv.ini
1919
phpenmod sqlsrv pdo_sqlsrv
2020

21-
apt purge php8.3-dev -y && apt-get autoremove -y
21+
apt purge php8.4-dev -y && apt-get autoremove -y

0 commit comments

Comments
 (0)