Simple solution:
In your dockerfile … swap out
postgres:
image: 'postgres:17'
for
postgres:
image: 'postgis/postgis:17-3.5-alpine'
https://hub.docker.com/r/postgis/postgis
Then put this in one of your migrations
public function up(): void
{
DB::statement('CREATE EXTENSION IF NOT EXISTS postgis');
Leave a Reply