Can’t access Adonis from Docker Container

I use Docker to contain my Adonis app. The build was success but when I access the app, I got ERR_SOCKET_NOT_CONNECTED or ERR_CONNECTION_RESET. My docker compose contains adonis and database. Previously, I use the setup similar with this for my expressjs app, and it has no problem. The adonis .env is remain standard, modification. This is my setup: I couldn’t spot anything wrong with my setup. Answer The serve command starts the HTTP server on port defined inside the .env file in the project root. Can you share that file in the post if the solution below does not work?

How to update a constraint in a migration

I need to add onDelete and onUpdate cascade to a constraint in a migration file. So i did an alter table, selecting the foreign keys and chaining with the alter method in the end of each command. But i’m getting a error saying that the constraint of this relationship already exists. error: constraint “deliveries_courier_id_foreign” for relation “deliveries” already exists How can i update a constraint of a table in a migration? Answer First i have to drop the foreign key column and then create it again. We can do that with Arbitrary Code in migrations We can also uso the