Help with Payload + Docker + Nginx

default discord avatar
iaremarkus
last month
4

Hey friends 👋



My Docker knowledge is sketchy at best, and whilst I get the core principles, nginx bends my mind. The Docker setup in

create-payload-app

is great, but I'd like to add an Nginx layer so that I can easily and repeatably deploy Payload to a Digital Ocean droplet (for eg)



Does anyone have a sample Dockerfile that includes the required Nginx setup to expose the Express server from Payload?



...ideally one with domain names etc set in a single config that are then mapped into the image.



Would appreciate any assistance 🙏

  • discord user avatar
    denolfe
    Payload Team
    last month

    Have you had a look at our deployment docs? There are some tutorials on how to handle nginz in some of the links

    https://payloadcms.com/docs/production/deployment#digitalocean-tutorials
  • default discord avatar
    iaremarkus
    last month

    I somehow missed that, I think, thansk @denolfe . I'll hack my way through and see if I can come right 😊

  • default discord avatar
    Zephury
    last month

    I personally prefer to not run nginx inside of a container.



    Running it in a container always tends to be more of a headache for me in the long run

  • discord user avatar
    denolfe
    Payload Team
    last month

    ☝️ Agree with this. Most would recommend relying on your deployment platform.

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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