-
Notifications
You must be signed in to change notification settings - Fork 9
feat: mle-ts-ords-backend template #301 #302
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great documentation @DimaNike, thanks!
|
||
- [Oracle Database 23ai](https://www.oracle.com/database/) or Oracle Database Free (provided via Docker Compose). | ||
- [Oracle REST Data Services](https://www.oracle.com/database/technologies/appdev/rest.html) (ORDS, configured for database access). | ||
- [SQLcl](https://www.oracle.com/database/sqldeveloper/technologies/sqlcl) for deploying MLE modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When testing we didn't find any real reference to SQLcl, so my question is, can we remove this dependency? If so, it would also need to be removed from the CLI wizard.
Object.assign( configObject, { | ||
ordsHost: ordsHost === '' ? await input( | ||
{ | ||
message: 'Please provide ORDS Base URL: ', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the ORDS base path provided contains a slash at the end, the BASE_URL for tests generates something like <my_hostname>/ords//<my_db_user>
with a double slash which makes tests fail (test/rest.test.js
)
|
||
Follow the general steps in the [mle-ts-sample/README](../mle-ts-sample/README.md#getting-started) to create your project, but **choose `mle-ts-ords-backend` as the template** during `@create-database-app` initialization. | ||
|
||
### 2. (Optional) Start Development Environment with Docker Compose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running the docker-compose up throws a permissions error:
Gracefully stopping... (press Ctrl+C again to force)
Error response from daemon: error while creating mount source path 'create-database-app/templates/mle-ts-ords-backend/ords/config': chown create-database-app/templates/mle-ts-ords-backend/ords/config: permission denied
we need to add this step or caveat informing chmod
can fix this: chmod -R 770 create-database-app/templates/mle-ts-ords-backend/
or execute with sudo / as admin
- Would be nice to also have the path to the docker-compose.yml (create-database-app/templates/mle-ts-ords-backend) so the users can know where to go to run this command
@@ -540,7 +554,8 @@ export default class Generate extends Command { | |||
} ); | |||
} | |||
|
|||
if(templateChoice == 'mle-ts-sample'){ | |||
if(templateChoice == 'mle-ts-sample' || templateChoice == 'mle-ts-ords-backend') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use strict comparison ===
instead
@@ -552,6 +567,21 @@ export default class Generate extends Command { | |||
}, | |||
) : sqlclPath | |||
}); | |||
if (templateChoice == 'mle-ts-ords-backend') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use strict comparison ===
instead
- `db23` - Oracle Database 23 Free | ||
- `ords-node1` - ORDS server configured to use `db23` | ||
|
||
See the `docker-compose.yml` file (and its comments) for configuration options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd also be really valuable if here we ask the user to create a user and grant the required permissions or create one for them.
What we did was create one of our own and grant:
CONNECT, DBA, PDB_DBA, SYSDBA, and EXECUTE ON JAVASCRIPT
[PR] MLE ORDS BACKEND TEMPLATE