Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Best practice for promoting pages to different environments?

default discord avatar
senseicain2 years ago
5

I’m working on defining our versioning / release promotion system for Payload CMS, and was wondering if there was a right way to go about this. For reference, in Contentful (🤮) you can have dif env versioning for the same page: dev, stg, or prod.



I see the versioning system, but don’t see a native approach for envs.



I’ve considered creating a duplicate of the page for each env, but then versioning branches off & the collection will clutter. Now I’m thinking of having separate collections (which would involve scripting), or introducing a meta field for env & adding in an Admin drop down to cycle through the latest versions for each env.



Any thoughts here?

  • discord user avatar
    jmikrut
    2 years ago

    hey

    @762024707242983476

    this is a great question. I've used Contentful lots before as well and I know exactly what you're talking about. We just rely on drafts but there's probably a really elegant way to do this with a few fields.

    @364562745447940099

    we should write up a tutorial for this

  • default discord avatar
    senseicain2 years ago

    Hi

    @364124941832159242

    thanks for the response. That makes sense. So ideally we’d have lower envs query for the draft version of the document



    I’ve been testing out the draft system, and everything seems to be working fine so far.



    Wanted to offer a few points of feedback on versioning. 1 - it’d be really nice to have a numeric versioning system (wouldn’t need to be full on semver) to make it easier to talk through. Date stamps & uuid’s aren’t very human friendly 🤖. 2 - you should be able to view the full document at specific versions in Admin. Only showing a change log might not be the best option for content ppl 👍🏻

  • default discord avatar
    lvvittor2 years ago

    +1 for this feature request

  • default discord avatar
    ailundefinedlast year

    I know that this topic is quite old but by seeing lack of follow up I would like to check how things are looking when it comes to different environments.



    And I don't want to sound rude, but relying on drafts works great for a few people, not few teams at the company.



    At my company we are considering different Contentful alternatives and we are utilizing at least one (at times 2 copies) of production, sometimes one or two of the staging and multiple environments cloned from dev env for whatever developers are working on.



    It is not recommended to work on the development environment as we are using visual regression on development (and staging and production) so any changes that would be made would be breaking snapshots.



    Ideal scenario would be a possibility to have the root environment (production) that could be copied into multiple environments that then could be copied from each other (so we could create a new environment from development env for whatever new feature developer would work on).



    In a nutshell: what's the current status on the multiple environments topic excluding drafts (which would ideally be supported at every environment level)?


    (keep in mind content refresh between environments from prod and migrations)

  • default discord avatar
    josh.dahms_047723 months ago

    Has there been any update on dev/prod environments? I am evaluating payload, and being env aware is a big plus.



    https://payloadcms.com/community-help/discord/best-practice-for-promoting-pages-to-different-environments

    is the top hit from google

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.