strapi-community / strapi-tool-dockerize

Easy add support for docker to your strapi project
MIT License
556 stars 35 forks source link

Plugins - dependencies and build #81

Open cjsewell opened 1 year ago

cjsewell commented 1 year ago

Feature Request

Currently the docker build only copies and installs the root level package.json and dependencies.

This means if you have built custom plugins under /src/plugins, their dependencies are not installed, and the packages are not build

The build script should search and copy any /src/plugins/*/package.json and install their dependencies.

It should also run any "build" scripts found in plugins package.json

Eventyret commented 1 year ago

I do like this though how do you solve a scenario where a user has no plugins runs the tool and later adds the plugins.

cjsewell commented 1 year ago

I haven't tested it out yet, but I imagine utilizing something like https://stackoverflow.com/a/63142468 to capture all the package.json files.

Assuming workspaces are used, that should work for the dependencies.

As for the build step, I'm not too sure how to pull that off without code. Maybe submitting a new feature to build.js thay would handle it?

I shall do some experiments....

Eventyret commented 1 year ago

Did you find out anything else @cjsewell else I will close this issue and you can reopen it if you find out anything else.