api-platform / docs

API Platform documentation
https://api-platform.com/docs/
164 stars 1.05k forks source link

Add instructions for building Next.js client with SSG locally in Docker Compose #1918

Closed J3m5 closed 3 months ago

J3m5 commented 4 months ago

This pull request adds detailed instructions for building a Next.js client with Static Site Generation (SSG) locally with http in a Docker Compose environment.

The steps include adjustments to the compose.yaml and compose.prod.yaml files, building and starting the php service container, optional creation of a .env file for the Next.js client, building the pwa service, and finally bringing up the full project.

This setup ensures the Next.js client can access the API locally at build time for static page generation.

The last commit adapt the docker compose documentation to reflect the changes of this PR adding the MERCURE_PUBLIC_URL and TRUSTED_HOSTS environment variables.

J3m5 commented 4 months ago

@dunglas I have updated this pull request to reflect the changes made to the api-platform template in my previous PR.