ging / fiware-idm

OAuth 2.0-based authentication of users and devices, user profile management, Single Sign-On (SSO) and Identity Federation across multiple administration domains.
https://keyrock-fiware.github.io
MIT License
37 stars 81 forks source link

Add option to run `npm run migrate_db` via a Docker ENV variable #217

Closed jason-fox closed 3 years ago

jason-fox commented 3 years ago

Proposed changes

Add option to run npm run migrate_db via a Docker ENV variable

Types of changes

What types of changes does your code introduce to the project: Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

github-actions[bot] commented 3 years ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️

jason-fox commented 3 years ago

Related to #216 - this will help with migration as it implements the simple quick fix suggestion made by @aarranz in https://github.com/ging/fiware-idm/issues/216#issuecomment-861312772

Allowing Keyrock to automigrate is potentially dangerous and not foolproof as it relies on the list of previously applied fixes to be up to date. It should be highly recommended that a backup is taken first.

Note: neither IDM_DB_MIGRATE nor IDM_DB_SEED is supported in distroless builds since they currently rely on exec() to run sequelize which in turn requires a command line.

apozohue10 commented 3 years ago

Thanks!