Skip to content

Feat/db post deploy hooks docs#526

Open
AjazSumaiya wants to merge 7 commits intoAdobeDocs:mainfrom
AjazSumaiya:feat/db-post-deploy-hooks-docs
Open

Feat/db post deploy hooks docs#526
AjazSumaiya wants to merge 7 commits intoAdobeDocs:mainfrom
AjazSumaiya:feat/db-post-deploy-hooks-docs

Conversation

@AjazSumaiya
Copy link
Copy Markdown

@AjazSumaiya AjazSumaiya commented Apr 9, 2026

Description

  • Adds a new documentation page explaining how to use the `post-app-deploy` hook to automatically set up database collections and indexes on every deployment
  • Complete `scripts/post-deploy-db-setup.js` hook script (tested end-to-end via `aio app deploy`)
  • How-it-works explanation
  • Instructions for running the script locally during development
  • Index types reference table

Related Issue

Closes CEXT-5960

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@keharper keharper self-assigned this Apr 9, 2026
Copy link
Copy Markdown
Contributor

@nofuss nofuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far so good


<InlineAlert variant="info" slots="text" />

A fully declarative approach (defining collections and indexes directly in `app.config.yaml`) is on the roadmap. The hook-based approach described here is the recommended path today.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest not calling this out. Even though it is our backlog, we do not have buy-in from Product, so there is no guarantee that we will ever deliver the feature.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

## Prerequisites

- A workspace database has been provisioned. See [Getting started with Database Storage](./database.md) for details.
- An IMS OAuth server-to-server credential is configured for your AIO project workspace. The following environment variables must be set in your `.env` file:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend calling out how these are normally set using something like the following:

aio app use --merge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even better would be to provide links to the other documentation so we don't repeat things more than necessary

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

- The following packages are installed in your project:

```bash
npm install @adobe/aio-lib-db @adobe/aio-sdk
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems redundant

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants