Adonisjs v6 app, migrations and seeder not running

akatora28
PRO

10 months ago

I've been able to succesfully build and deploy my Adonisjs v6 app, with the below nixpack, the only issue that I'm running into now is that I can't login since my initial migrations didn't run and I'm not sure why since it looks like that should've been part of the build.

I'm relatively new to nixpacks so any pointers or tips would be appreciated

[phases.setup]
nixpkgs = [
  "nodejs_22",
  "postgresql_13"
]

[phases.install]
cmds = [
  "npm ci"
]

[phases.build]
cmds = [
  "npm run build",
  "cd build && npm ci",
  "node ace migration:run"
]

[start]
cmd = "node ace serve"

0 Replies

akatora28
PRO

10 months ago

722dccb2-d05a-4099-b21f-f525bef38d3c


10 months ago

from your build logs -

You are in production environment. Want to continue running migrations? (y/N) ‣ false

change the migration command to node ace migration:run --force


akatora28
PRO

10 months ago

Thanks! trying that now real quick, fingers crossed


akatora28
PRO

10 months ago

huh, kinda stumped here ```Dockerfile:26

24 | RUN npm run build

25 | RUN cd build && npm ci

26 | >>> RUN node ace migration:run --force

27 |

28 |

ERROR: failed to solve: process "/bin/bash -ol pipefail -c node ace migration:run --force" did not complete successfully: exit code: 1

Error: Docker build failed```


akatora28
PRO

10 months ago

Not sure why there isn't more output from the command


10 months ago

you can scroll up lol


akatora28
PRO

10 months ago

ah, sorry not used to reading this output


10 months ago

try enabling the new builder in the service settings, the private network is not available on the legacy builder


akatora28
PRO

10 months ago

👍 That did the trick!


10 months ago

awsome