Skip to content

cdryampi/wordpress_headless

Repository files navigation

Headless WordPress + Supabase + Astro

A dockerized monorepo with a single edge Nginx routing Astro and WordPress, while Supabase runs independently.

Platform: Optimized for Windows development with PowerShell commands.

Quick start

  1. Copy environment variables:
Copy-Item .env.example .env
  1. Build and run:
docker compose up --build

URLs

Service URL
Site (edge) http://localhost:8080
Guides http://localhost:8080/guides
WordPress admin http://localhost:8080/wp-admin
WPGraphQL http://localhost:8080/graphql
Supabase Kong API http://localhost:54321
Supabase Studio http://localhost:54323
Astro dev server http://localhost:4321

Reset volumes

docker compose down -v

If you want to remove persisted data manually:

Remove-Item -Recurse -Force volumes\db_wp, volumes\supabase_db

GraphQL verification

Invoke-RestMethod -Uri "http://localhost:8080/graphql" `
  -Method POST `
  -ContentType "application/json" `
  -Body '{"query":"{ posts(first:2){ nodes{ title slug featuredImage{ node{ sourceUrl } } } } }"}'

Notes

  • WordPress uses MariaDB only. Supabase uses its own Postgres.
  • Supabase is not routed through the edge by default.
  • All commands in this repo use PowerShell syntax.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published