Deploying to a VPS with a frontend in docker

default discord avatar
frufrufruchtjoghurt12 months ago
4

Hello y‘all!



I don’t know if these questions fit here, but I don’t know where else to ask, so I‘ll do it anyway. We are two students and frontend devs (but I do have some experience with working on backends in go), but we only ever programmed stuff and never deployed anything until now. By some miracle we got the opportunity to develop a small landing page with the option to register for workshops offered on the page (and a possible extension with a blog and newsletter functionality later). For the frontend we thought about using either vanilla js or react for better component reusability. This isn’t going to be site with very high traffic, so we thought about hosting this on a vps from hetzner (we and our client are located in central europe).



This brings me to multiple questions regarding payload:


- Is Payload even the right tool for the job? We don’t want to use a hammer on a screw.


- How can we efficiently deploy the stack to a VPS? Is it possible to combine Payload with our frontend in a docker container network, so that it can be hosted on a single VPS? If yes, what would such a configuration look like and what are the caveats? Our client should be able to access the admin panel from a subdomain to edit the page as well.


- If the approach above isn’t ideal, what would the right one look like for a small site? It shouldn’t be too cost intensive.



I hope this isn’t the wrong place to ask this. Otherwise I would be grateful if you could point me to some resources, if you are not able to help me with this.



Thanks!

  • discord user avatar
    denolfe
    12 months ago

    Hey, happy to help out. In your case, I wouldn't overcomplicate things with docker. Just a simple VM will do for $5-10 / month. We have a nice section in the docs that will point you in the right direction

    https://payloadcms.com/docs/production/deployment#digitalocean-tutorials


    We also have Payload Cloud that will configure everything for you and also auto deploy your code on changes if you want to have a look at that.

  • default discord avatar
    frufrufruchtjoghurt12 months ago

    Thanks for your answer! I must've missed that while scrolling through the docs, because thats actually perfect!


    I have another question regarding minimum system requirements:


    - How much RAM is needed/recommended?


    - Does it also work well on ARM64 processors? Hetzner offers an option for ARM64 which provides a lot more power at a better price.

  • discord user avatar
    denolfe
    12 months ago

    Payload can run comfortably on 512mb of RAM. However, keep in mind that if you also need to build the application on the same machine, you may need more RAM to cover that process.



    I myself have not tried to run on an ARM64 machine explicitly. I wouldn't expect there to be issues, though. The only thing that I'd keep an eye on is the dependency on sharp, the image manipulation library we use. You may need to explicitly install it for that platform if you run into something related to it.



    Hope that helps!

  • default discord avatar
    frufrufruchtjoghurt12 months ago

    Thats good to know! A quick google search revealed that a precompiled binary for Linux ARM64 is available for sharp, so I guess thats covered.


    Thanks a lot for the help! It's nice to have such an open and friendly community! I will ask again if any problems arise and try to help others, when I (hopefully) get more proficient with Payload!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.