What are the available providers in railpack?

g-libardi
PROOP

a month ago

I can't find this info anywhere and it is also not available in the json schema.

The information would be useful overall and specifically I want to know what is the provider that enables UV package manager support.

$30 Bounty

0 Replies

a month ago

Hey, check out the railpack's docs!


g-libardi
PROOP

a month ago

Hey Brody, maybe its my fault, but i was following the docs all along and I am still confused. I could find this:

Detection
Your project will be detected as a Python application if any of these conditions are met:

A main.py file exists in the root directory
A requirements.txt file exists
A pyproject.toml file exists
A Pipfile exists

But I am using a repository with multiple services so the provider is not detected automatically. I also tried installing UV manually but it's never avaiable during the deploy step


a month ago

You can install additional mise packages using RAILPACK_PACKAGES if that's what you're looking for, so in your case you'd do something like

RAILPACK_PACKAGES="uv"

and you can add whatever else you need like node or python or whatever


a month ago

-#


g-libardi
PROOP

a month ago

Hey Fragly, thanks. That mede the trick for the build phase, but the uv package is still not avaiable during deploy phase,
Also, UV package manager is not avaiable through apt so the RAILPACKDEPLOYAPT_PACKAGES env var will not work.
I am not sure how could I further configure it, I will be really glad if anyone can help me.
This is my railpack.json:

{
    "$schema": "https://schema.railpack.com",
    "steps": {
      "build": {
        "commands": [
          "echo The current directory is:",
          "pwd"
          { "src": "services/1_ingestion/*", "dest": "." },
          "echo The contents of the current directory are:",
          "ls -la",
          "echo Installing dependencies...",
          "uv sync --frozen"
        ]
      }
    },
    "deploy": {
      "inputs": [
        { "step": "build" }
      ],
      "startCommand": "uv run main.py"
    }
  }

a month ago

I think uv is getting installed outside of your app directory resulting in it not being transferred over to the runtime image, you could try using inputs to copy the uv package over to the deployment, it would look something like this:

{
    "$schema": "https://schema.railpack.com",
    "steps": {
      "build": {
        "commands": [
          "echo The current directory is:",
          "pwd"
          { "src": "services/1_ingestion/*", "dest": "." },
          "echo The contents of the current directory are:",
          "ls -la",
          "echo Installing dependencies...",
          "uv sync --frozen"
        ]
      }
    },
    "deploy": {
      "inputs": [
        { "step": "build", "include": ["path-to-uv-package"] }
      ],
      "startCommand": "uv run main.py"
    }
  }

i've never done this myself so I'm unsure if this will work, just a potential solution I think is worth exploring


iloveitaly
HOBBY

25 days ago

@Veecks I help out with Railpack maintenance! Could you explain more about what you are trying to do?

Right now, using multiple providers in a project is not well supported, but it's something on our roadmap that we would love to explore to understand your use case more.


Loading...
What are the available providers in railpack? - Railway Help Station