Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from Apr 3, 2024

Conversation

J3m5
Copy link
Contributor

@J3m5 J3m5 commented Mar 14, 2024

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.

JH added 2 commits March 14, 2024 10:10
…ient locally with SSG

Added detailed instructions for building a Next.js client with Static Site Generation (SSG) in a Docker Compose environment. The steps include adjustments to the compose.prod.yaml file, 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 at build time for static page generation.
…with docker compose

Updated the Next.js documentation to include instructions for generating a production build locally using Docker Compose. The update provides a link to the detailed steps in the Docker Compose deployment guide.
@J3m5 J3m5 force-pushed the docker-nextjs-local-production-build branch from 8aee607 to 37fb0ec Compare March 14, 2024 10:19
… Kubernetes doc

Added optional Docker build command for SSG projects in Kubernetes doc. This command allows the PWA to access a locally running API during the build process, useful for generating static pages at build time.
@J3m5 J3m5 force-pushed the docker-nextjs-local-production-build branch from 37fb0ec to 400ed22 Compare March 14, 2024 10:24
@J3m5 J3m5 marked this pull request as draft March 14, 2024 10:30
…variables

To ensure TRUSTED_HOSTS and MERCURE_PUBLIC_URL remain valid when altering SERVER_NAME to use an HTTP scheme or include a port, these variables must be overridden. This adjustment accommodates configurations where SERVER_NAME deviates from the standard HTTPS format or includes port specifications.
@J3m5 J3m5 marked this pull request as ready for review March 18, 2024 09:39
@J3m5 J3m5 requested a review from dunglas March 18, 2024 12:59
@J3m5 J3m5 self-assigned this Mar 18, 2024
@J3m5
Copy link
Contributor Author

J3m5 commented Mar 20, 2024

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

@soyuka soyuka merged commit 84771e7 into 3.2 Apr 3, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants