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]: Minio template error "The string :9001 is no a valid url." #4229

Open
che0one opened this issue Nov 10, 2024 · 4 comments · May be fixed by #4246
Open

[Bug]: Minio template error "The string :9001 is no a valid url." #4229

che0one opened this issue Nov 10, 2024 · 4 comments · May be fixed by #4246
Labels
🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization.

Comments

@che0one
Copy link
Contributor

che0one commented Nov 10, 2024

Error Message and Logs

It seems impossible to add or save the actual MinIO template or integrate it over "New Resource -> Docker Compose Empty" with or without other containers due to an issue related to ":9001" part. The error message, "The string :9001 is not a valid URL," doesn't prevent saving the Compose configuration to Coolify Projects, but makes it impossible to save the MINIO_SERVER_URL and $MINIO_BROWSER_REDIRECT_URL variables or change other things...

Default minio template from Services list

services:
  minio:
    image: quay.io/minio/minio:latest
    command: server /data --console-address ":9001"
    environment:
      - MINIO_SERVER_URL=$MINIO_SERVER_URL
      - MINIO_BROWSER_REDIRECT_URL=$MINIO_BROWSER_REDIRECT_URL
      - MINIO_ROOT_USER=$SERVICE_USER_MINIO
      - MINIO_ROOT_PASSWORD=$SERVICE_PASSWORD_MINIO
    volumes:
      - minio-data:/data
    healthcheck:
      test: ["CMD", "mc", "ready", "local"]
      interval: 5s
      timeout: 20s
      retries: 10

Image

Steps to Reproduce

  1. Copy Minio Template from Services List
  2. Try to make new resource using Docker Compose Empty

Example Repository URL

https://github.com/coollabsio/coolify/blob/main/templates/compose/minio.yaml

Coolify Version

v4.0.0-beta.364

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04 & Alpine-Linux:Latest & Ubuntu 24.04 ARM

Additional Information

No response

@che0one che0one added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Nov 10, 2024
@chmielulu
Copy link

Changing the “:9001” part to, for example, “:8000” still gives the same error “The string :9001 is not a valid URL,” so it looks like the problem is not in the template itself.

I tried specifying the port also using an environment variable, such as:

services:
  minio:
    image: 'quay.io/minio/minio:latest'
    command: 'server /data --console-address ":${MINIO_CONSOLE_PORT}"'
    environment:
      - MINIO_SERVER_URL=$MINIO_SERVER_URL
      - MINIO_BROWSER_REDIRECT_URL=$MINIO_BROWSER_REDIRECT_URL
      - MINIO_ROOT_USER=$SERVICE_USER_MINIO
      - MINIO_ROOT_PASSWORD=$SERVICE_PASSWORD_MINIO
      - MINIO_CONSOLE_PORT=9001
    volumes:
      - 'minio-data:/data'
    healthcheck:
      test:
        - CMD
        - mc
        - ready
        - local
      interval: 5s
      timeout: 20s
      retries: 10

I then get the same error again and again, even after changing the port to a different one.

@chmielulu
Copy link

I managed to set up Minio by following these steps:

  1. Created a new Minio resource but encountered the following error:
    The string :9001 is not a valid URL.

  2. Edited the Docker Compose configuration for the resource and temporarily switched the image:
    From: 'quay.io/minio/minio:latest'
    To: 'bitnami/minio:latest'.

  3. Triggered the deployment with the updated configuration.

  4. Once the deployment completed, reverted the image back to:
    'quay.io/minio/minio:latest'.

  5. Deployed again. After this step, Minio started working as expected, even with the following command:

    command: 'server /data --console-address ":9001"'

@LaurenceJJones
Copy link
Contributor

LaurenceJJones commented Nov 11, 2024

So tracing back through the code it seems the error may stem from here (but im no php expert 😅 ):

$payload = collect([
$MINIO_BROWSER_REDIRECT_URL->value.':9001',
$MINIO_SERVER_URL->value.':9000',
]);

Since the variables will be blank upon a new deployment, coolify tries to validate the URL is in fact a URL but :<port> does not pass the validation check. (Since its a new deployment you havent had chance to set the variables yet)

And using the same logic the issue will also effect the logto deployment also.

@andrasbacsai
Copy link
Member

This will be fixed in the next version.

@andrasbacsai andrasbacsai linked a pull request Nov 12, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

4 participants