build
build copied to clipboard
[plugin] MongoDB Atlas
Create a Netlify build plugin that allows users to provision MongoDB atlas databases for a site.
The user will need to supply their mongo API key from atlas.
The first time it runs, it will create a database instance
Example config:
plugins:
- mongo:
databaseName: 'xyz'
MONGO_API_KEY: ${env:mongokey}
...
see this is where i get confused between addons and plugins.
easy to say "anything goes" but once you let people do this you will have confusion between them for ever.
Yeah maybe these types of plugins will run on a provisioning
step.
They might expose functions like:
function mongoPlugin(conf) {
return {
create: ({ netlifyConfig }) => {
console.log('idempotent create')
},
update: () => {
console.log('update if inputs have changed')
},
delete: () => {
console.log('delete when site deleted')
}
}
}
Figuring it out as we go
For right now we can use the lifecycle in place.
function mongoPlugin(conf) {
return {
init: () => {
// create idempotent mongoDB instance
},
}
}
TODO look into the mongoDB complexity
Also outputs.
Blocked by #186.
This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 14 days if no further activity occurs. Thanks!
This issue was closed because it had no activity for over 1 year.