This project provides a proof of concept on a tool that can generate a Compose file to run the dependent services for your application. It does so by using the application's dependency tree to identify the dependent services and then generate a Compose file. This example is using gpt-4.
-
Clone this repo locally
-
Create a
config.json
file at the root of the project with the following structure:{ "OPENAI_API_KEY": "sk-****-COMING-FROM-OPENAI-****" }
-
Install the dependencies with
yarn install
-
Run the tool and specify the directory you want to run against:
$ node src/index.js /path/to/project/directory
- Install the project globally by running
yarn global add "file:$PWD"
- Navigate your CLI to a project and run
compose-generator
- If it doesn't work, add
~/.yarn/bin
to your$PATH
variable
- If it doesn't work, add
Coming soon! Currently, development is done against tests. You can start the tests by running yarn test
.