Railpack - New build issue.
speleodb
HOBBYOP

2 months ago

I have something weird.

Railpack builds fails because it can't find and copy /app/nickpacks.toml. Which sounds weird because why would I need nickpacks.toml to build with railpack

Unfortunately the build logs of the last successful build (currently deployed) disappeared (why in the world are they deleted ?).
But I suspect an update to RAILPACK that break my build.

╭────────────────╮
 Railpack 0.8.0 
╰────────────────╯

 Using config file `railpack.json`
 The config file format is not yet finalized and subject to change.
 Found .dockerignore file, applying filters
 Using provider Python from config

....

Packages
──────────
pipx       1.8.0     railpack default (latest)
pipx:uv    0.8.22    railpack default (latest)
python     3.13.7    custom config (3.13)

...

Successfully prepared Railpack plan for build


context: 9n1s-jHfL

load build definition from railpack-plan.json

library/alpine:pull token for registry-1.docker.io

install apt packages: libpq-dev
Processing triggers for libc-bin (2.36-9+deb12u10) ...

install apt packages: git libpq5
Processing triggers for libc-bin (2.36-9+deb12u10) ...

copy .python-version

install mise packages: pipx, pipx:uv, python
mise pipx:uv@0.8.22  installed

pipx install uv

copy /mise/shims, /mise/installs, /usr/local/bin/mise, /etc/mise/config.toml, /root/.local/state/mise, /app/.python-version, pyproject.toml, uv.lock

uv sync --extra production --frozen

copy / /app, /pyproject.toml /app/pyproject.toml, /nickpacks.toml /app/nickpacks.toml
ERROR: failed to build: failed to solve: lstat /nickpacks.toml: no such file or directory

So very obviously there's now a COPY of /nickpacks.toml /app/nickpacks.toml which should not be here…

0 Replies

speleodb
HOBBYOP

2 months ago

railway.toml

[build]
builder = "RAILPACK"

[deploy]
runtime = "V2"
numReplicas = 1
startCommand = "gunicorn config.wsgi:application --workers ${GUNICORN_WORKERS} --threads ${GUNICORN_THREADS} --max-requests 128 --preload"
preDeployCommand = "python /app/manage.py migrate && python /app/manage.py collectstatic --noinput --verbosity=3"
sleepApplication = false
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10

railpack.json

{
  "$schema": "https://schema.railpack.com",
  "provider": "python",
  "packages": {
    "python": "3.13"
  },
  "steps": {
    "install": {
      "inputs": [
        {
          "step": "packages:mise"
        }
      ],
      "commands": [
        {
          "path": "/root/.local/bin"
        },
        {
          "path": "/app/.venv/bin"
        },
        {
          "cmd": "pipx install uv"
        },
        {
          "src": "pyproject.toml",
          "dest": "pyproject.toml"
        },
        {
          "src": "uv.lock",
          "dest": "uv.lock"
        },
        {
          "cmd": "uv sync --extra production --frozen"
        }
      ],
      "caches": [
        "uv"
      ],
      "variables": {
        "PIP_DEFAULT_TIMEOUT": "100",
        "PIP_DISABLE_PIP_VERSION_CHECK": "1",
        "PYTHONDONTWRITEBYTECODE": "1",
        "PYTHONFAULTHANDLER": "1",
        "PYTHONHASHSEED": "random",
        "PYTHONUNBUFFERED": "1",
        "RAILPACK_DEPLOY_APT_PACKAGES": "git",
        "UV_CACHE_DIR": "/opt/uv-cache",
        "UV_COMPILE_BYTECODE": "1",
        "UV_LINK_MODE": "copy",
        "UV_PYTHON_DOWNLOADS": "never",
        "VIRTUAL_ENV": "/app/.venv"
      }
    }
  },
  "deploy": {
    "aptPackages": ["git", "libpq5"]
  }
}

Loading...