Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to run PHP project after the last update (Error: "no service selected") #1857

Closed
samtax01 opened this issue Mar 17, 2024 · 1 comment · Fixed by #1861
Closed

Comments

@samtax01
Copy link

Description

Hi,
Thanks for this amazing service.

Before the last update, I was able to run my project using this below docker file.

Docker file

FROM php:8.2-fpm-alpine

# Set the working directory
WORKDIR /var/www/html

# Install native PHP extensions
RUN apk update \
    && apk add --no-cache --update linux-headers ${PHPIZE_DEPS} \
    && apk add libzip-dev \
       freetype-dev \
       libjpeg-turbo-dev \
       libpng-dev \
    && docker-php-ext-install \
       exif \
       mysqli \
       pdo \
       pdo_mysql \
    && docker-php-ext-configure gd --with-freetype --with-jpeg \
    && docker-php-ext-install -j$(nproc) gd \
    && docker-php-ext-install opcache


RUN docker-php-ext-install gd

# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Copy your application into the container
COPY .. /var/www/html
RUN php /usr/local/bin/composer install --no-dev --no-interaction -o

EXPOSE 3000
CMD php -S 0.0.0.0:3000

After redeploying my project, I got

Deployment
tannytop
production
Dashboard
Exited
Configuration
Execute Command
Logs
Deployments
Open Application
AdvancedDeploy
Deployment Log
Deployment is Failed.

[2024-Mar-17 15:01:13.026227] Starting deployment of samtax01/TannyTop-Dashboard:main to tont-server.
[2024-Mar-17 15:01:13.050305] Preparing container with helper image: ghcr.io/coollabsio/coolify-helper:latest.
[2024-Mar-17 15:01:13.095074]
COMMAND:
docker run -d --network coolify --name h40g8cg --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-helper:latest

OUTPUT:
5222a37ce5dbbb34ec1379ef675c928a9c657f5cbdba35ee755ffdb73c775e61
[2024-Mar-17 15:01:14.489062]
COMMAND:
docker exec h40g8cg bash -c 'GIT_SSH_COMMAND="ssh -o ConnectTimeout=30 -p 22 -o Port=22 -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git ls-remote https://x-access-token:<REDACTED>@github.com/samtax01/TannyTop-Dashboard.git main'

OUTPUT:
817ba95a3d8abcd3150ffb70e7c228c2980612a6 refs/heads/main
[2024-Mar-17 15:01:14.498414] Setting base directory to /artifacts/h40g8cg.
[2024-Mar-17 15:01:14.594924] Configuration changed. Rebuilding image.
[2024-Mar-17 15:01:14.989658] ----------------------------------------
[2024-Mar-17 15:01:14.991586] Importing samtax01/TannyTop-Dashboard:main (commit sha HEAD) to /artifacts/h40g8cg.
[2024-Mar-17 15:01:15.111074]
COMMAND:
docker exec h40g8cg bash -c 'git clone -b main https://x-access-token:<REDACTED>@github.com/samtax01/TannyTop-Dashboard.git /artifacts/h40g8cg'

OUTPUT:
Cloning into '/artifacts/h40g8cg'...
[2024-Mar-17 15:01:16.670180] Generating nixpacks configuration with: nixpacks plan -f toml /artifacts/h40g8cg
[2024-Mar-17 15:01:16.745710]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks plan -f toml /artifacts/h40g8cg'

OUTPUT:
providers = []
buildImage = 'ghcr.io/railwayapp/nixpacks:ubuntu-1702339400'

[variables]
NIXPACKS_METADATA = 'php'
NIXPACKS_PHP_FALLBACK_PATH = '/index.php'
PORT = '80'

[staticAssets]
"nginx.template.conf" = '''
worker_processes 5;
daemon off;

worker_rlimit_nofile 8192;

events {
worker_connections 4096; # Default: 1024
}

http {
include $!{nginx}/conf/mime.types;
index index.html index.htm index.php;

default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout;
error_log /dev/stdout;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128; # this seems to be required for some vhosts

server {
listen ${PORT};
listen [::]:${PORT};
server_name localhost;

$if(NIXPACKS_PHP_ROOT_DIR) (
root ${NIXPACKS_PHP_ROOT_DIR};
) else (
root /app;
)

add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";

index index.php;

charset utf-8;

$if(IS_LARAVEL) (
location / {
try_files $uri $uri/ /index.php?$query_string;
}
) else ()

$if(NIXPACKS_PHP_FALLBACK_PATH) (
location / {
try_files $uri $uri/ ${NIXPACKS_PHP_FALLBACK_PATH}?$query_string;
}
) else ()

location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }

$if(IS_LARAVEL) (
error_page 404 /index.php;
) else ()

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include $!{nginx}/conf/fastcgi_params;
include $!{nginx}/conf/fastcgi.conf;
}

location ~ /\.(?!well-known).* {
deny all;
}
}
}'''
"php-fpm.conf" = '''
[www]
listen = 127.0.0.1:9000
user = nobody
pm = dynamic
pm.max_children = 50
pm.min_spare_servers = 4
pm.max_spare_servers = 32
pm.start_servers = 18
clear_env = no
'''
"scripts/config/template.mjs" = '''
import { readFile, writeFile } from "fs/promises";
import { getNixPath } from "../util/nix.mjs";

const replaceStr = input =>
input
// If statements
.replaceAll(/\$if\s*\((\w+)\)\s*\(([^]*?)\)\s*else\s*\(([^]*?)\)/gm,
(_all, condition, value, otherwise) =>
process.env[condition] ? replaceStr(value) : replaceStr(otherwise)
)
// Variables
.replaceAll(/\${(\w+)}/g,
(_all, name) => process.env[name]
)
// Nix paths
.replaceAll(/\$!{(\w+)}/g,
(_all, exe) => getNixPath(exe)
)

export async function compileTemplate(infile, outfile) {
await writeFile(outfile,
replaceStr(await readFile(infile, { encoding: 'utf8' })),
{ encoding: 'utf8' })
}
'''
"scripts/prestart.mjs" = '''
#!/usr/bin/env node
import { compileTemplate } from "./config/template.mjs";
import { e } from "./util/cmd.mjs";
import { checkEnvErrors, isLaravel } from "./util/laravel.mjs";
import Logger from "./util/logger.mjs";
import { access, constants } from 'node:fs/promises'

const prestartLogger = new Logger('prestart');
const serverLogger = new Logger('server');

if (process.argv.length != 4) {
prestartLogger.error(`Usage: ${process.argv[1]} `)
process.exit(1);
}

if (isLaravel()) {
checkEnvErrors('/app')
}

await Promise.all([
access('/app/storage', constants.R_OK)
.then(() => e('chmod -R ugo+rw /app/storage'))
.catch(() => {}),
compileTemplate(process.argv[2], process.argv[3])
]).catch(err => prestartLogger.error(err));

serverLogger.info(`Server starting on port ${process.env.PORT}`)
'''
"scripts/util/cmd.mjs" = '''
import { execSync } from "child_process";

export const e = cmd => execSync(cmd).toString().replace('\n', '');'''
"scripts/util/laravel.mjs" = '''
import Logger from "./logger.mjs"
import * as fs from 'node:fs/promises'
import * as path from 'node:path'

const variableHints = {
'APP_ENV': 'You should probably set this to `production`.'
};

const logger = new Logger('laravel');

export const isLaravel = () => process.env['IS_LARAVEL'] != null;

function checkVariable(name) {
if (!process.env[name]) {
let hint =
`Your app configuration references the ${name} environment variable, but it is not set.`
+ (variableHints[name] ?? '');

logger.warn(hint);
}
}

export async function checkEnvErrors(srcdir) {
const envRegex = /env\(["']([^,]*)["']\)/g;
const configDir = path.join(srcdir, 'config');

const config =
(await Promise.all(
(await fs.readdir(configDir))
.filter(fileName => fileName.endsWith('.php'))
.map(fileName => fs.readFile(path.join(configDir, fileName)))
)).join('');

for (const match of config.matchAll(envRegex)) {
if (match[1] != 'APP_KEY') checkVariable(match[1]);
}

if (!process.env.APP_KEY) {
logger.warn('Your app key is not set! Please set a random 32-character string in your APP_KEY environment variable. This can be easily generated with `openssl rand -hex 16`.');
}
}
'''
"scripts/util/logger.mjs" = '''
export default class Logger {
/** @type string */
#tag;

/**
* @param {string} tag
*/
constructor(tag) {
this.#tag = tag
}

#log(color, messageType, message, fn = console.log) {
fn(`\x1b[${color}m[${this.#tag}:${messageType}]\x1b[0m ${message}`)
}

info(message) {
this.#log(34, 'info', message)
}

warn(message) {
this.#log(35, 'warn', message, console.warn)
}

error(message) {
this.#log(31, 'error', message, console.error)
}
}
'''
"scripts/util/nix.mjs" = '''
import { e } from "./cmd.mjs";

export const getNixPath = (exe) => e(`nix-store -q ${e(`which ${exe}`)}`);
'''
[phases.build]
dependsOn = ['install']

[phases.install]
dependsOn = ['setup']
cmds = [
'mkdir -p /var/log/nginx && mkdir -p /var/cache/nginx',
'composer install --ignore-platform-reqs',
]

[phases.setup]
nixPkgs = [
'(php82.withExtensions (pe: pe.enabled ++ []))',
'nginx',
'libmysqlclient',
'php82Packages.composer',
'nodejs_18',
'npm-9_x',
]
nixLibs = ['libmysqlclient']
nixOverlays = ['https://github.com/railwayapp/nix-npm-overlay/archive/main.tar.gz']
nixpkgsArchive = '5148520bfab61f99fd25fb9ff7bfbb50dad3c9db'

[start]
cmd = 'node /assets/scripts/prestart.mjs /assets/nginx.template.conf /nginx.conf && (php-fpm -y /assets/php-fpm.conf & nginx -c /nginx.conf)'
[2024-Mar-17 15:01:16.867729]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks detect /artifacts/h40g8cg'

OUTPUT:
php
[2024-Mar-17 15:01:16.876283] Found application type: php.
[2024-Mar-17 15:01:16.878874] If you need further customization, please check the documentation of Nixpacks: https://nixpacks.com/docs/providers/php
[2024-Mar-17 15:01:16.992720] ----------------------------------------
[2024-Mar-17 15:01:16.996831] Building docker image started.
[2024-Mar-17 15:01:16.999013] To check the current progress, click on Show Debug Logs.
[2024-Mar-17 15:01:17.158231]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:

╔══════════════════════════════ Nixpacks v1.20.0 ══════════════════════════════╗
║ setup │ (php82.withExtensions (pe: pe.enabled ++ [])), nginx, ║
║ │ libmysqlclient, php82Packages.composer, nodejs_18, npm-9_x ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ mkdir -p /var/log/nginx && mkdir -p /var/cache/nginx ║
║ │ composer install --ignore-platform-reqs ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ node /assets/scripts/prestart.mjs /assets/nginx.template.conf ║
║ │ /nginx.conf && (php-fpm -y /assets/php-fpm.conf & nginx -c ║
║ │ /nginx.conf) ║
╚══════════════════════════════════════════════════════════════════════════════╝
[2024-Mar-17 15:01:17.537284]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 962B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1702339400
[2024-Mar-17 15:01:18.252128]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#3 DONE 0.8s

#4 [1/9] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1702339400@sha256:1a9c1eed040aacf8f898be048210ef2d3366b1228373c4e6818362bb75611b32
#4 DONE 0.0s

#5 [internal] load build context
[2024-Mar-17 15:01:18.503420]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#5 transferring context: 4.68MB 0.1s done
#5 DONE 0.1s

#6 [4/9] RUN nix-env -if .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix && nix-collect-garbage -d
#6 CACHED

#7 [2/9] WORKDIR /app/
#7 CACHED

#8 [3/9] COPY .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix
#8 CACHED

#9 [5/9] COPY .nixpacks/assets /assets/
#9 CACHED

#10 [6/9] COPY . /app/.
#10 DONE 0.1s

#11 [7/9] RUN mkdir -p /var/log/nginx && mkdir -p /var/cache/nginx
[2024-Mar-17 15:01:18.655400]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#11 DONE 0.2s

#12 [8/9] RUN composer install --ignore-platform-reqs
[2024-Mar-17 15:01:19.067971]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 0.408 Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
#12 0.408 Do not run Composer as root/super user! See https://getcomposer.org/root for details
#12 0.469 Installing dependencies from lock file (including require-dev)
#12 0.472 Verifying lock file contents can be installed on current platform.
#12 0.486 Package operations: 45 installs, 0 updates, 0 removals
[2024-Mar-17 15:01:19.218321]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 0.488 - Downloading edsdk/flmngr-server-php (1.6.0)
#12 0.490 - Downloading ehexphp/core (v1.0.48)
#12 0.490 - Downloading psr/log (3.0.0)
#12 0.490 - Downloading filp/whoops (2.15.4)
#12 0.491 - Downloading voku/portable-ascii (2.0.1)
#12 0.491 - Downloading symfony/translation-contracts (v3.4.1)
#12 0.491 - Downloading symfony/polyfill-mbstring (v1.29.0)
#12 0.492 - Downloading symfony/deprecation-contracts (v3.4.0)
#12 0.492 - Downloading symfony/translation (v6.4.4)
#12 0.493 - Downloading symfony/polyfill-php80 (v1.29.0)
#12 0.493 - Downloading psr/clock (1.0.0)
#12 0.494 - Downloading carbonphp/carbon-doctrine-types (2.1.0)
#12 0.494 - Downloading nesbot/carbon (2.72.3)
#12 0.494 - Downloading illuminate/macroable (v10.48.3)
#12 0.495 - Downloading psr/simple-cache (3.0.0)
#12 0.495 - Downloading psr/container (2.0.2)
#12 0.495 - Downloading illuminate/contracts (v10.48.3)
#12 0.496 - Downloading illuminate/conditionable (v10.48.3)
#12 0.496 - Downloading illuminate/collections (v10.48.3)
#12 0.496 - Downloading symfony/polyfill-ctype (v1.29.0)
#12 0.496 - Downloading doctrine/inflector (2.0.10)
#12 0.497 - Downloading illuminate/support (v10.48.3)
#12 0.497 - Downloading illuminate/container (v10.48.3)
#12 0.497 - Downloading brick/math (0.12.1)
#12 0.498 - Downloading illuminate/database (v10.48.3)
#12 0.498 - Downloading illuminate/pipeline (v10.48.3)
#12 0.498 - Downloading illuminate/bus (v10.48.3)
#12 0.498 - Downloading illuminate/events (v10.48.3)
#12 0.499 - Downloading symfony/finder (v6.4.0)
#12 0.499 - Downloading illuminate/filesystem (v10.48.3)
#12 0.499 - Downloading illuminate/view (v10.48.3)
#12 0.499 - Downloading illuminate/config (v10.48.3)
#12 0.500 - Downloading jenssegers/blade (v2.0.0)
#12 0.500 - Downloading php-parallel-lint/php-console-color (v1.0.1)
#12 0.500 - Downloading php-parallel-lint/php-console-highlighter (v1.0.0)
#12 0.501 - Downloading php-parallel-lint/php-parallel-lint (v1.3.2)
#12 0.501 - Downloading phpmailer/phpmailer (v6.9.1)
#12 0.501 - Downloading rakit/validation (v1.4.0)
#12 0.502 - Downloading symfony/polyfill-php83 (v1.29.0)
#12 0.502 - Downloading symfony/http-foundation (v7.0.4)
#12 0.502 - Downloading symfony/routing (v7.0.5)
#12 0.502 - Downloading usmanhalalit/strana (1.x-dev 3e5e7aa)
#12 0.503 - Downloading phpoption/phpoption (1.9.2)
#12 0.503 - Downloading graham-campbell/result-type (v1.1.2)
#12 0.503 - Downloading vlucas/phpdotenv (v5.6.0)
#12 0.509 0/45 [>---------------------------] 0%
[2024-Mar-17 15:01:19.808567]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 1.227 5/45 [===>------------------------] 11%
[2024-Mar-17 15:01:20.110057]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 1.475 11/45 [======>---------------------] 24%
[2024-Mar-17 15:01:20.409277]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 1.727 20/45 [============>---------------] 44%
#12 1.827 23/45 [==============>-------------] 51%
[2024-Mar-17 15:01:20.710436]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 2.039 34/45 [=====================>------] 75%
[2024-Mar-17 15:01:20.839169]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 2.257 40/45 [========================>---] 88%
[2024-Mar-17 15:01:20.953507]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 2.292 45/45 [============================] 100%
#12 2.293 - Installing edsdk/flmngr-server-php (1.6.0): Extracting archive
#12 2.297 - Installing ehexphp/core (v1.0.48): Extracting archive
#12 2.299 - Installing psr/log (3.0.0): Extracting archive
#12 2.301 - Installing filp/whoops (2.15.4): Extracting archive
#12 2.306 - Installing voku/portable-ascii (2.0.1): Extracting archive
#12 2.311 - Installing symfony/translation-contracts (v3.4.1): Extracting archive
#12 2.313 - Installing symfony/polyfill-mbstring (v1.29.0): Extracting archive
#12 2.317 - Installing symfony/deprecation-contracts (v3.4.0): Extracting archive
#12 2.322 - Installing symfony/translation (v6.4.4): Extracting archive
#12 2.329 - Installing symfony/polyfill-php80 (v1.29.0): Extracting archive
#12 2.335 - Installing psr/clock (1.0.0): Extracting archive
#12 2.338 - Installing carbonphp/carbon-doctrine-types (2.1.0): Extracting archive
#12 2.341 - Installing nesbot/carbon (2.72.3): Extracting archive
#12 2.343 - Installing illuminate/macroable (v10.48.3): Extracting archive
#12 2.346 - Installing psr/simple-cache (3.0.0): Extracting archive
#12 2.348 - Installing psr/container (2.0.2): Extracting archive
#12 2.355 - Installing illuminate/contracts (v10.48.3): Extracting archive
#12 2.372 - Installing illuminate/conditionable (v10.48.3): Extracting archive
[2024-Mar-17 15:01:21.103675]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 2.372 - Installing illuminate/collections (v10.48.3): Extracting archive
#12 2.375 - Installing symfony/polyfill-ctype (v1.29.0): Extracting archive
#12 2.376 - Installing doctrine/inflector (2.0.10): Extracting archive
#12 2.377 - Installing illuminate/support (v10.48.3): Extracting archive
#12 2.378 - Installing illuminate/container (v10.48.3): Extracting archive
#12 2.382 - Installing brick/math (0.12.1): Extracting archive
#12 2.384 - Installing illuminate/database (v10.48.3): Extracting archive
#12 2.384 - Installing illuminate/pipeline (v10.48.3): Extracting archive
#12 2.392 - Installing illuminate/bus (v10.48.3): Extracting archive
#12 2.393 - Installing illuminate/events (v10.48.3): Extracting archive
#12 2.393 - Installing symfony/finder (v6.4.0): Extracting archive
#12 2.394 - Installing illuminate/filesystem (v10.48.3): Extracting archive
#12 2.395 - Installing illuminate/view (v10.48.3): Extracting archive
#12 2.395 - Installing illuminate/config (v10.48.3): Extracting archive
#12 2.396 - Installing jenssegers/blade (v2.0.0): Extracting archive
#12 2.397 - Installing php-parallel-lint/php-console-color (v1.0.1): Extracting archive
#12 2.397 - Installing php-parallel-lint/php-console-highlighter (v1.0.0): Extracting archive
#12 2.408 - Installing php-parallel-lint/php-parallel-lint (v1.3.2): Extracting archive
#12 2.409 - Installing phpmailer/phpmailer (v6.9.1): Extracting archive
#12 2.409 - Installing rakit/validation (v1.4.0): Extracting archive
#12 2.410 - Installing symfony/polyfill-php83 (v1.29.0): Extracting archive
#12 2.413 - Installing symfony/http-foundation (v7.0.4): Extracting archive
#12 2.414 - Installing symfony/routing (v7.0.5): Extracting archive
#12 2.415 - Installing usmanhalalit/strana (1.x-dev 3e5e7aa): Extracting archive
#12 2.417 - Installing phpoption/phpoption (1.9.2): Extracting archive
#12 2.418 - Installing graham-campbell/result-type (v1.1.2): Extracting archive
#12 2.419 - Installing vlucas/phpdotenv (v5.6.0): Extracting archive
#12 2.447 0/45 [>---------------------------] 0%
[2024-Mar-17 15:01:21.254639]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 2.565 17/45 [==========>-----------------] 37%
[2024-Mar-17 15:01:21.368354]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 2.682 29/45 [==================>---------] 64%
#12 2.787 39/45 [========================>---] 86%
[2024-Mar-17 15:01:21.519421]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 2.805 45/45 [============================] 100%
[2024-Mar-17 15:01:21.819952]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 3.164 Generating autoload files
#12 3.179 21 packages you are using are looking for funding.
#12 3.179 Use the `composer fund` command to find out more!
[2024-Mar-17 15:01:21.970658]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#12 DONE 3.3s

#13 [9/9] COPY . /app
[2024-Mar-17 15:01:22.125483]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#13 DONE 0.1s

#14 exporting to image
#14 exporting layers
[2024-Mar-17 15:01:22.317024]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
#14 exporting layers 0.3s done
#14 writing image sha256:e7e45f0a7910434309db4a777befedfd83455710ffc1a7b7f0839db0b67c1b37 done
#14 naming to docker.io/library/c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 done
#14 DONE 0.3s
[2024-Mar-17 15:01:22.320226]
COMMAND:
docker exec h40g8cg bash -c 'nixpacks build -c /artifacts/thegameplan.json --cache-key 'c80woko' --no-error-without-start -n c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6 /artifacts/h40g8cg'

OUTPUT:
=== Successfully Built! ===

Run:
docker run -it c80woko:817ba95a3d8abcd3150ffb70e7c228c2980612a6
[2024-Mar-17 15:01:22.466846] Building docker image completed.
[2024-Mar-17 15:01:22.470866] ----------------------------------------
[2024-Mar-17 15:01:22.473489] Application has ports mapped to the host system, rolling update is not supported.
[2024-Mar-17 15:01:22.475842] Consistent container name feature enabled, rolling update is not supported.
[2024-Mar-17 15:01:22.478408] Removing old containers.
[2024-Mar-17 15:01:22.632956]
COMMAND:
docker exec h40g8cg bash -c 'SOURCE_COMMIT=817ba95a3d8abcd3150ffb70e7c228c2980612a6 docker compose --project-directory /artifacts/h40g8cg -f /artifacts/h40g8cg/docker-compose.yml up --build -d'

OUTPUT:
no service selected
[2024-Mar-17 15:01:22.677909] Oops something is not okay, are you okay? 😢
[2024-Mar-17 15:01:22.680365] no service selected
[2024-Mar-17 15:01:22.682838] Deployment failed. Removing the new version of your application.

I had to use Docker because Nixpacks wasn't giving any of my PHP project the right permissions for "write".
After the update, Nixpacks stopped working as well.

Any assistance would be greatly appreciated 🙏

Thank you.

Minimal Reproduction (if possible, example repository)

The only way I could reproduce this error is trying to run any PHP project with the docker file above

Exception or Error

No response

Version

v4.0.0-beta.239

@andrasbacsai
Copy link
Member

This will be fixed in the upcoming version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants