nitrictech / cli

Nitric CLI. Manage and run Nitric apps locally and deploy to any cloud.
https://nitric.io
Apache License 2.0
25 stars 10 forks source link

Improve support for monorepos with docker context config #744

Closed davemooreuws closed 4 months ago

davemooreuws commented 4 months ago

Feature Request

Suggestion

At the moment the docker context is wherever the nitric project is located. A solution to this would be to add a new key to the custom runtimes config called context

Value

Ability to include all the files for a monorepo, to allow it to be installed and built and share packages.

Alternatives

Moving projects to the root. Which isn't ideal.

Example for turbo repo

name: guestbook-api
services:
  - match: services/*.ts
    runtime: turbo
    type: ""
    start: npm run dev:services $SERVICE_PATH
runtimes:
  turbo:
    # All services that specify the 'turbo' runtime will be built using this dockerfile
    dockerfile: ./turbo.dockerfile
    context: ../../
    args:
      TURBO_SCOPE: "guestbook-api"
tjholm commented 4 months ago

Lets move the OOTB service idea to a separate issue, I think in general it could be useful would just need to work out conflicts with the runtime property as well as glob matching relativity (which may cause some confusion) if we were to implement it.

davemooreuws commented 4 months ago

Lets move the OOTB service idea to a separate issue, I think in general it could be useful would just need to work out conflicts with the runtime property as well as glob matching relativity (which may cause some confusion) if we were to implement it.

Agreed, I have updated the issue.

nitric-bot commented 4 months ago

:tada: This issue has been resolved in version 1.45.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: