Adonisjs v6 app, migrations and seeder not running
akatora28
PROOP

2 years 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"

10 Replies

akatora28
PROOP

2 years ago

722dccb2-d05a-4099-b21f-f525bef38d3c


2 years 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
PROOP

2 years ago

Thanks! trying that now real quick, fingers crossed


akatora28
PROOP

2 years 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
PROOP

2 years ago

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


2 years ago

you can scroll up lol


akatora28
PROOP

2 years ago

ah, sorry not used to reading this output


2 years ago

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


akatora28
PROOP

2 years ago

👍 That did the trick!


2 years ago

awsome


Loading...