thomasgranbohm / nextjs-build-networking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NextJS networking test

The dream

Running both frontend and backend in the same docker-compose file, and frontend being able to access the backend through docker-compose internal networks during the build phase.

Since both containers are on the same network after the build phase this shouldn't be a problem.

This would enable Next.js to build using SSG and ISG.

The reality

docker compose up -d backend
docker compose build frontend

This will fail because the frontend container does not have access to the backend container during build.

About


Languages

Language:Dockerfile 53.4%Language:Rust 22.8%Language:TypeScript 17.5%Language:JavaScript 6.3%