Skip to content

[Bug]: SERVICE_URL_WEB-APP is an invalid ENV variable, fails laravel build #6202

Closed as duplicate of#6152
@yashkolambekar

Description

@yashkolambekar

Error Message and Logs

The laravel deploy fails due to the - character in SERVICE_URL_WEB-APP injected by coolify.

Relevant Error log

4.503  77/77 [============================] 100%
2025-Jul-15 15:30:16.347495
4.643 Generating optimized autoload files
2025-Jul-15 15:30:16.347495
6.461 > Illuminate\Foundation\ComposerScripts::postAutoloadDump
2025-Jul-15 15:30:16.347495
6.478 > @php artisan package:discover --ansi
2025-Jul-15 15:30:16.347495
6.552 The environment file is invalid!
2025-Jul-15 15:30:16.347495
6.555 Failed to parse dotenv file. Encountered an invalid name at [SERVICE_URL_WEB-APP].
2025-Jul-15 15:30:16.347495
6.559 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
2025-Jul-15 15:30:16.347495
------
2025-Jul-15 15:30:16.352068
failed to solve: process "/bin/sh -c composer install --no-dev --optimize-autoloader &&     npm install &&     npm run build &&     chown -R www-data:www-data storage bootstrap/cache" did not complete successfully: exit code: 1
2025-Jul-15 15:30:16.355483
exit status 1
2025-Jul-15 15:30:16.408152
Oops something is not okay, are you okay? 😢
2025-Jul-15 15:30:16.414015
failed to solve: process "/bin/sh -c composer inst

Steps to Reproduce

  1. create a new resource of a dockerised laravel app using git (https://github.com/idolcs/idolcstemp)
  2. choose docker compose
  3. add random env variables
  4. build fails

Example Repository URL

https://github.com/idolcs/idolcstemp

Coolify Version

v4.0.0-beta.420.5

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions