Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task] Create an azd template for setup of Strapi resources #61

Closed
Tracked by #47 ...
aaronpowell opened this issue Oct 24, 2022 · 2 comments
Closed
Tracked by #47 ...

[Task] Create an azd template for setup of Strapi resources #61

aaronpowell opened this issue Oct 24, 2022 · 2 comments
Assignees
Labels
e2e-spec priority: P0 High priority Scenario 3 status: blocked Unable to progress on a work item

Comments

@aaronpowell
Copy link
Member

Following the guide outlined on the docs for azd, a template needs to be created that will include the following Azure resources

  • PostgreSQL or MySQL database options*
  • Azure Container Registry
  • Azure Container Apps
  • AppInsights

It should also boostrap the Dockerfile that is required for deploying to Container Apps.

The template shouldn't include Strapi itself, instead it should expect that the user will either already have Strapi in their repo (we'll dictate conventions to where it should be) or they will run the create-strapi-app command themselves.

* Ideally there will be a prompt option on whether they want to use PostgreSQL or MySQL, but due to limitations in the template engine, we'll have to dictate a database option as default, but there will be both resource sets in there for the user to change if desired.

@aaronpowell
Copy link
Member Author

Now that scenario 3 has been implemented, I've pondered how a template could be made for it.

Strapi has a template feature for setting up new projects, but it works on a specific structure of what files exist where. The other alternative is that Strapi has starters, which use templates but are more complete applications (so combine something like Next.js + Strapi).

On the other hand you have azd templates, which are really just taking an existing GitHub repo, cloning it and pushing to Azure using azd up. These need to be more structured like a standard repo, so could be similar to the starters concept from the Strapi CLI.

Then there's the idea proposed in the initial description, don't have Strapi in the azd template repo, just the infra/azure.yaml/etc. files so you can azd-ify an existing repo. This would essentially be using the Make your project azd compatible approach, but some how make it easier to import the various files needed, rather than copy/paste them from docs/online.

Here's my pro/con list for the approaches:

  • Create a Strapi template or starter
    • Pros: integrate with the standard Strapi workflow, working application immediately
    • Cons: Requires shipping Strapi "in the box", thus having to worry about upgrade/maintenance of packages
  • Create an azd template
    • Pros: Clearer ties to azd and that workflow, working application immediately
    • Cons: Foreign to someone who's familiar with Strapi and bootstrapping projects, requires shipping Strapi in the box
  • azd-only files template
    • Pros: Don't have to maintain the Strapi instance in the template, allows adding it into existing project
    • Cons: Doesn't appear that azd has direct support for this workflow at present

@manekinekko
Copy link
Collaborator

It looks like the template for azd and Strapi has already been created. Can we close this issue? cc @sinedied

module cms './app/blog-cms.bicep' = {
name: 'cms'
scope: rg
params: {
containerAppsEnvironmentName: !empty(containerAppsEnvironmentName) ? containerAppsEnvironmentName : '${abbrs.appManagedEnvironments}${resourceToken}'
containerRegistryName: !empty(containerRegistryName) ? containerRegistryName : '${abbrs.containerRegistryRegistries}${resourceToken}'
applicationInsightsName: monitoring.outputs.applicationInsightsName
location: location
adminJwtSecret: adminJwtSecret
apiTokenSalt: apiTokenSalt
appKeys: appKeys
jwtSecret: jwtSecret
databasePassword: cmsDatabasePassword
serverName: !empty(cmsDatabaseServerName) ? cmsDatabaseServerName : '${abbrs.dBforPostgreSQLServers}db-${resourceToken}'
environmentName: environmentName
storageAccountName: storageAccount.outputs.name
databaseName: 'strapi-${resourceToken}'
}
}

@manekinekko manekinekko added priority: P0 High priority status: blocked Unable to progress on a work item labels Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e-spec priority: P0 High priority Scenario 3 status: blocked Unable to progress on a work item
Projects
None yet
Development

No branches or pull requests

3 participants