You are right! The app and load balancer would have a separate containers. In this case we don't have separate application, though.
In the Dockerfile RUN jekyll build generates static HTML pages, and in COPY --from=build-stage /usr/src/app/_site/ /usr/share/nginx/html we copy the generated pages for nginx to use. In nginx config, we tell nginx to serve those pages in
location / {
root /usr/share/nginx/html;
index index.html;
}
You are right! The app and load balancer would have a separate containers. In this case we don't have separate application, though.
In the Dockerfile
RUN jekyll build
generates static HTML pages, and inCOPY --from=build-stage /usr/src/app/_site/ /usr/share/nginx/html
we copy the generated pages for nginx to use. In nginx config, we tell nginx to serve those pages inThus, we don't need any other containers.
Did I answer to your question? 😊
Yes! Thanks 😀
Maybe I didn't go through the Dockerfile properly. For static sites this is a good approach.