From 381692bc218306dff693f37242179301fc741c6d Mon Sep 17 00:00:00 2001 From: Qisthi Ramadhani Date: Fri, 2 Jan 2026 18:28:56 +0000 Subject: [PATCH] feat: add fullstack-fp workflow and Dockerfile with PHP 8.5 support --- .github/workflows/publish-docker-beta.yml | 8 +++ .github/workflows/publish-docker.yml | 8 +++ ...rvice_docker-build-and-publish-franken.yml | 2 +- .../service_docker-build-and-publish.yml | 5 +- src/fullstack-fp/Dockerfile | 67 +++++++++++++++++++ src/fullstack-fp/shell/aliases.sh | 9 +++ src/fullstack-fp/shell/bashrc | 21 ++++++ 7 files changed, 115 insertions(+), 5 deletions(-) create mode 100644 src/fullstack-fp/Dockerfile create mode 100644 src/fullstack-fp/shell/aliases.sh create mode 100644 src/fullstack-fp/shell/bashrc diff --git a/.github/workflows/publish-docker-beta.yml b/.github/workflows/publish-docker-beta.yml index c3906d3..04d2555 100644 --- a/.github/workflows/publish-docker-beta.yml +++ b/.github/workflows/publish-docker-beta.yml @@ -27,6 +27,14 @@ jobs: php-variation: fullstack-http checkout-type: branch secrets: inherit + fullstack-fp: + uses: ./.github/workflows/service_docker-build-and-publish.yml + with: + upstream-channel-prefix: "beta-" + tag-prefix: "beta-" + php-variation: fullstack-fp + checkout-type: branch + secrets: inherit franken: uses: ./.github/workflows/service_docker-build-and-publish-franken.yml with: diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 1f08edc..40b9a04 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -24,6 +24,14 @@ jobs: php-variation: fullstack-http checkout-type: latest-stable secrets: inherit + fullstack-fp: + uses: ./.github/workflows/service_docker-build-and-publish.yml + with: + upstream-channel-prefix: "" + tag-prefix: "" + php-variation: fullstack-fp + checkout-type: latest-stable + secrets: inherit franken: uses: ./.github/workflows/service_docker-build-and-publish-franken.yml with: diff --git a/.github/workflows/service_docker-build-and-publish-franken.yml b/.github/workflows/service_docker-build-and-publish-franken.yml index deb419d..9721867 100644 --- a/.github/workflows/service_docker-build-and-publish-franken.yml +++ b/.github/workflows/service_docker-build-and-publish-franken.yml @@ -22,9 +22,9 @@ jobs: strategy: matrix: php-version: - - "8.2" - "8.3" - "8.4" + - "8.5" steps: ## # Checkout branch (for push deployments) diff --git a/.github/workflows/service_docker-build-and-publish.yml b/.github/workflows/service_docker-build-and-publish.yml index 90101fd..9721867 100644 --- a/.github/workflows/service_docker-build-and-publish.yml +++ b/.github/workflows/service_docker-build-and-publish.yml @@ -22,12 +22,9 @@ jobs: strategy: matrix: php-version: - - "7.4" - - "8.0" - - "8.1" - - "8.2" - "8.3" - "8.4" + - "8.5" steps: ## # Checkout branch (for push deployments) diff --git a/src/fullstack-fp/Dockerfile b/src/fullstack-fp/Dockerfile new file mode 100644 index 0000000..a73c25e --- /dev/null +++ b/src/fullstack-fp/Dockerfile @@ -0,0 +1,67 @@ +ARG NODE_VERSION='22.16.0' +ARG PHP_VERSION='8.3' +ARG BASE_IMAGE="serversideup/php:${PHP_VERSION}-frankenphp-bookworm" + +FROM node:${NODE_VERSION}-slim AS node + +FROM oven/bun:debian AS bun + +FROM ${BASE_IMAGE} + +LABEL maintainer="Qisthi Ramadhani (https://qisthi.dev)" + +ENV PHP_OPCACHE_ENABLE=1 + +USER root + +RUN install-php-extensions gd exif bcmath mongodb && \ + apt-get update && \ + apt-get install -y --no-install-recommends git unzip bash && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Install node and npm +COPY --from=node /usr/lib /usr/lib +COPY --from=node /usr/local/lib /usr/local/lib +COPY --from=node /usr/local/include /usr/local/include +COPY --from=node /usr/local/bin /usr/local/bin +COPY --from=node /opt/yarn-v1.22.22 /opt/yarn-v1.22.22 + +# Install bun +COPY --from=bun /usr/local/bin /usr/local/bin + +# Install sonar-scanner +RUN apt-get update && \ + apt-get install -y --no-install-recommends curl unzip && \ + if [ "$(uname -m)" = "aarch64" ]; then \ + # aarch64 + curl https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-linux-aarch64.zip --output /tmp/sonar-scanner.zip && \ + SONAR_DIR="sonar-scanner-6.2.1.4610-linux-aarch64" ; \ + else \ + # x86_64 + curl https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-linux-x64.zip --output /tmp/sonar-scanner.zip && \ + SONAR_DIR="sonar-scanner-6.2.1.4610-linux-x64" ; \ + fi && \ + unzip /tmp/sonar-scanner.zip -d /opt && \ + ln -s /opt/${SONAR_DIR}/bin/sonar-scanner /usr/local/bin/sonar-scanner && \ + rm /tmp/sonar-scanner.zip && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Clean up +RUN rm -rf /tmp/* /var/tmp/* + +# Drop back to our unprivileged user +USER www-data + +RUN composer global config allow-plugins.gmta/composer-velocita true && \ + composer global require gmta/composer-velocita && \ + git config --global --add safe.directory /builds + +# Copy shell aliases to both root and www-data user homes +COPY shell/aliases.sh /root/.aliases.sh +COPY shell/aliases.sh /var/www/.aliases.sh + +# Copy shell configuration +COPY shell/bashrc /root/.sh +COPY shell/bashrc /var/www/.bashrc diff --git a/src/fullstack-fp/shell/aliases.sh b/src/fullstack-fp/shell/aliases.sh new file mode 100644 index 0000000..54493c6 --- /dev/null +++ b/src/fullstack-fp/shell/aliases.sh @@ -0,0 +1,9 @@ +# -- Aliases ------------------------------------------ +alias a="php artisan" +alias art="php artisan" +alias migrate="php artisan migrate" +alias seed="php artisan db:seed" +alias fresh="php artisan migrate:fresh" +alias c="composer" +alias test="php artisan test" +alias routes="php artisan route:list" diff --git a/src/fullstack-fp/shell/bashrc b/src/fullstack-fp/shell/bashrc new file mode 100644 index 0000000..9db71f9 --- /dev/null +++ b/src/fullstack-fp/shell/bashrc @@ -0,0 +1,21 @@ +#!/bin/bash + +# Set LS color options +export LS_OPTIONS='--color=auto' + +# Define common aliases +alias ls='ls $LS_OPTIONS' +alias ll='ls $LS_OPTIONS -l' +alias l='ls $LS_OPTIONS -lA' + +# Safety aliases +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' + +# Source aliases file if it exists +if [ -f ~/.aliases.sh ]; then + source ~/.aliases.sh +else + echo "404: ~/.aliases.sh not found." +fi