Adonisjs v6 app, migrations and seeder not running

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"
[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"
9 Replies
Percy
Percyβ€’3mo ago
Project ID: 722dccb2-d05a-4099-b21f-f525bef38d3c
El Queso Bandito
El Queso Banditoβ€’3mo ago
722dccb2-d05a-4099-b21f-f525bef38d3c
Brody
Brodyβ€’3mo ago
from your build logs -
You are in production environment. Want to continue running migrations? (y/N) β€£ false
You are in production environment. Want to continue running migrations? (y/N) β€£ false
change the migration command to node ace migration:run --force
El Queso Bandito
El Queso Banditoβ€’3mo ago
Thanks! trying that now real quick, fingers crossed 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
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
Not sure why there isn't more output from the command
Brody
Brodyβ€’3mo ago
you can scroll up lol
El Queso Bandito
El Queso Banditoβ€’3mo ago
ah, sorry not used to reading this output
Brody
Brodyβ€’3mo ago
try enabling the new builder in the service settings, the private network is not available on the legacy builder
El Queso Bandito
El Queso Banditoβ€’3mo ago
πŸ‘ That did the trick!
Brody
Brodyβ€’3mo ago
awsome
Want results from more Discord servers?
Add your server