Deploying SSR Astro and Express in a docker container

Hello! Currently have a Server Side Rendered Astro site, with PayloadCMS as a backend. The astro site is set up with the node SSR adapter. The plan is to use the underlying express server of Payload to also work as the server to run the Astro SSR middleware from the ndoe adapter. The issue is, I'm not exactly sure how to do this in a decent way, considering said middleware needs to be imported in the file where the express server is initialised and that can't really be done before the astro site is built. But it needs to be imported before the payload app is built. Currently the astro and payload codebases are set up in a monorepo in separate workspaces using pnpm. If the astro site was purely static it'd be dead easy in my dockerfile to just build it, copy the folder over and have express set up to serve that. But unfortunately I need SSR. Thanks for any help!
0 Replies
No replies yetBe the first to reply to this messageJoin