Python Poetry package-mode flag throws Nixpacks docker build errors

samuelmsPRO

7 months ago

Project ID: e9ef7e90-b42f-4779-a125-24c92fbb4abf

We're evaluating a test deployment for migrating some of our services to Railway. Presently, there's an issue using Poetry's package-mode flag that causes build errors in Nixpacks / Docker.

Errors in Railway's build log:

13.13 The Poetry configuration is invalid:
13.13 - Additional properties are not allowed ('package-mode' was unexpected)

ERROR: failed to solve: process "/bin/bash -ol pipefail -c python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install poetry==$NIXPACKSPOETRYVERSION && poetry install --no-dev --no-interaction --no-ansi" did not complete successfully: exit code: 1

Error: Docker build failed

Poetry documentation: https://python-poetry.org/docs/basic-usage/#operating-modes

0 Replies

7 months ago

nixpacks may be using an outdated poetry version, or something along those lines, it would likely be best to write a Dockerfile for this project so that you have complete control over the build


anubhav1603HOBBY

3 months ago

having same issue with Procfile i need to run the docker file and railway will pickup itself?


3 months ago

correct, if you have a Dockerfile Railway will use it automatically