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]: Persistent storage volumes for Preview Builds #5290

Open
sponte opened this issue Mar 6, 2025 · 0 comments
Open

[Bug]: Persistent storage volumes for Preview Builds #5290

sponte opened this issue Mar 6, 2025 · 0 comments
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@sponte
Copy link

sponte commented Mar 6, 2025

Error Message and Logs

Configured persistent storage volumes automatically append the -pr-<number> suffix to the source which can cause issues if user wants to mount a socket e.g. /var/run/docker.sock.

This is happening inside of this function app/Jobs/ApplicationDeploymentJob.php:1915:

    private function generate_local_persistent_volumes()
    {
        $local_persistent_volumes = [];
        foreach ($this->application->persistentStorages as $persistentStorage) {
            if ($persistentStorage->host_path !== '' && $persistentStorage->host_path !== null) {
                $volume_name = $persistentStorage->host_path;
            } else {
                $volume_name = $persistentStorage->name;
            }
            if ($this->pull_request_id !== 0) {
                $volume_name = $volume_name.'-pr-'.$this->pull_request_id;
            }
            $local_persistent_volumes[] = $volume_name.':'.$persistentStorage->mount_path;
        }

        return $local_persistent_volumes;
    }

Steps to Reproduce

  1. Create application that uses Github and enable preview deployments
  2. Configure persistent storage for your application and set source and target to /var/run/docker.sock
  3. Create a pull request in Github

Expected result: The configured bind mount is provided to the preview deployment container without changing the source path

Actual result: The -pr-<number> suffix is added to the source path breaking the deployment.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.397

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

CentOS Stream 10 (Coughlan)

Additional Information

No response

@sponte sponte added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.
Projects
None yet
Development

No branches or pull requests

1 participant