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

Suggestion: make yarn scripts available on server (build version) #937

Open
CarlosNZ opened this issue Nov 1, 2022 · 1 comment
Open
Labels
Importance: Nice to have Issues that don't need to be included, just nice to have

Comments

@CarlosNZ
Copy link
Collaborator

CarlosNZ commented Nov 1, 2022

Currently if you try to run the scripts such as yarn migrate or yarn backup, the server complains about missing ts-node, which makes sense since the JS build doesn't need it. However it is possible to run them by writing a long-winded command into the build folder and running the actual .js file using node.

It would be good if this was a bit easier.

Suggestion: make a common "scripts" file for parsing these yarn commands -- if in development, run the script as it does currently. But in production, run a different version of the command that calls the compiled '.js' verison of the script.

I'm thinking this would be good for:

  • yarn migrate
  • yarn backup
  • yarn cleanup (Pending, not in develop yet)

It might also be good if we could run yarn release from the server, so we could run builds directly from the server, but that would require a bit more work.

@CarlosNZ CarlosNZ added the Importance: Nice to have Issues that don't need to be included, just nice to have label Nov 1, 2022
@CarlosNZ
Copy link
Collaborator Author

CarlosNZ commented Nov 4, 2022

Adding to this, we should also allow a few other testing related things to be enabled in Docker instance via environmental variables. I'm thinking:

  • Scheduled "test" mode
  • ???

Just thinking of ways to improve our ability to test things in a build rather than just in dev. Ideally the automated test suite could be run in a build environment too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Importance: Nice to have Issues that don't need to be included, just nice to have
Projects
None yet
Development

No branches or pull requests

1 participant