Skip to content

Commit 4994ae6

Browse files
authored
Upgrade Sail to PHP v8.4 (alexjustesen#2368)
Co-authored-by: Alex Justesen <[email protected]>
1 parent cc738a6 commit 4994ae6

File tree

11 files changed

+44
-22
lines changed

11 files changed

+44
-22
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
services:
22
laravel.test:
33
build:
4-
context: ./docker/8.3
4+
context: ./docker/8.4
55
dockerfile: Dockerfile
66
args:
77
WWWGROUP: '${WWWGROUP}'
8-
image: speedtest-tracker-8.3/app
8+
image: speedtest-tracker-8.4/app
99
extra_hosts:
1010
- 'host.docker.internal:host-gateway'
1111
ports:
@@ -34,7 +34,7 @@ services:
3434
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
3535
volumes:
3636
- 'sail-pgsql:/var/lib/postgresql/data'
37-
- './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
37+
- './docker/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
3838
networks:
3939
- sail
4040
healthcheck:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"config": {
101101
"optimize-autoloader": true,
102102
"platform": {
103-
"php": "8.3"
103+
"php": "8.4"
104104
},
105105
"preferred-install": "dist",
106106
"sort-packages": true,

composer.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ RUN apt-get update && apt-get upgrade -y \
2727
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb8dc7e53946656efbce4c1dd71daeaab4ad4cab6' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
2828
&& echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
2929
&& apt-get update \
30-
&& apt-get install -y php8.3-cli php8.3-dev \
31-
php8.3-pgsql php8.3-sqlite3 php8.3-gd \
32-
php8.3-curl \
33-
php8.3-mysql php8.3-mbstring \
34-
php8.3-xml php8.3-zip php8.3-bcmath php8.3-soap \
35-
php8.3-intl php8.3-readline \
36-
php8.3-msgpack php8.3-igbinary php8.3-redis \
37-
php8.3-memcached php8.3-pcov php8.3-xdebug \
30+
&& apt-get install -y php8.4-cli php8.4-dev \
31+
php8.4-pgsql php8.4-sqlite3 php8.4-gd \
32+
php8.4-curl \
33+
php8.4-mysql php8.4-mbstring \
34+
php8.4-xml php8.4-zip php8.4-bcmath php8.4-soap \
35+
php8.4-intl php8.4-readline \
36+
php8.4-msgpack php8.4-igbinary php8.4-redis \
37+
php8.4-pcov php8.4-xdebug \
3838
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
3939
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
4040
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
@@ -61,15 +61,16 @@ RUN apt-get update && apt-get upgrade -y \
6161
&& apt-get clean \
6262
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
6363

64-
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.3
64+
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.4
6565

6666
RUN userdel -r ubuntu
6767
RUN groupadd --force -g $WWWGROUP sail
6868
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
69+
RUN git config --global --add safe.directory /var/www/html
6970

7071
COPY start-container /usr/local/bin/start-container
7172
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
72-
COPY php.ini /etc/php/8.3/cli/conf.d/99-sail.ini
73+
COPY php.ini /etc/php/8.4/cli/conf.d/99-sail.ini
7374
RUN chmod +x /usr/local/bin/start-container
7475

7576
EXPOSE 80/tcp
File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
/usr/bin/mariadb --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
4+
CREATE DATABASE IF NOT EXISTS testing;
5+
GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%';
6+
EOSQL
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
mysql --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
4+
CREATE DATABASE IF NOT EXISTS testing;
5+
GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%';
6+
EOSQL
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SELECT 'CREATE DATABASE testing'
2+
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'testing')\gexec

0 commit comments

Comments
 (0)