-
-
Notifications
You must be signed in to change notification settings - Fork 417
Add taskfile and process-compose config for better local development across services #4941
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.
i just ran it locally and I'm a bit unsure. It involved installing two extra binary dependencies and two new config files.
it could be done with one well-structured bash script, a Makefile or a package.json in the root (optionally with a lightweight node-based executer like concurrently or npm-run-all)
i'm always thinking of the overhead needed when we add extra tooling. We'd have to document where to download and how to install the two new deps, etc.
These are simplified to illustrate
package.json
{
"scripts": {
"dev": "concurrently -n enter,text,image \"npm run dev:enter\" \"npm run dev:text\" \"npm run dev:image\"",
"dev:enter": "cd enter.pollinations.ai && npm run dev",
"dev:text": "cd text.pollinations.ai && npm run dev",
"dev:image": "cd image.pollinations.ai && npm run dev"
}
}
makefile
install:
cd enter.pollinations.ai && npm install &
cd text.pollinations.ai && npm install &
cd image.pollinations.ai && npm install &
wait
dev:
@trap 'kill 0' EXIT; \
cd enter.pollinations.ai && npm run dev & \
cd text.pollinations.ai && npm run dev & \
cd image.pollinations.ai && npm run dev & \
wait|
My thinking in using If we use nix, installing the dependencies is done by the dev shell, so i personally don't think its that much of an issue, but i understand if it's not for you. Maybe we throw out task, replace it with node, but keep process-compose? I find it very handy how it lets me see the individual logs, restart individual services etc. Or maybe the node runners have similar functions? |
|
@eulervoid I prefer a solution that doesnt require an additional install unless it's light and node-based as in it uses the same tooling we use everywhere. i think there's probably an easy way to set up process-compose for your local environment which is outside of version control. even pm2 feels like overkill to me because it has all kinds of features for longer running processes and sometimes makes it difficult for ai agents to debug and interact with the testing environment. i think grepping or filtering for individual service logs is quite trivial if we set it up nice. concurrently seems quite good for that in terms of features but also open just to bash or make or everything in the scripts part in the root package.json |
|
Ok, lets close this PR and i will add my process-compose.yml to gitignore. |
|
@eulervoid I quickly vibecoded the solution with concurrently and a simple package.json
i think it fulfills the purpose at least for my use cases and is a bit more lightweight considering everything is already node. {
"name": "pollinations-monorepo",
"private": true,
"scripts": {
"install:all": "npm install --prefix enter.pollinations.ai && npm install --prefix text.pollinations.ai && npm install --prefix image.pollinations.ai",
"dev": "concurrently --kill-others-on-fail --prefix '[{name}]' --names 'enter,text,image' -c 'auto' 'npm run dev --prefix enter.pollinations.ai' 'npm run dev --prefix text.pollinations.ai' 'npm run dev --prefix image.pollinations.ai'",
"dev:enter": "npm run dev --prefix enter.pollinations.ai",
"dev:text": "npm run dev --prefix text.pollinations.ai",
"dev:image": "npm run dev --prefix image.pollinations.ai"
},
"devDependencies": {
"concurrently": "^9.1.0"
}
}
thats the root package.json now. check if you think its ok. i think concurrently also has ways of dynamically hiding / unhiding specific services |
|
@claude can you look at how we can start the enter service in a way it is connecting the local running services? create an env for it? override the variaboes? |
|
Claude finished @voodoohop's task —— View job Solution for enter service local development
Service URLs are configured in
To connect enter to local services:
Port mapping:
--- • PR Branch |

Adds repo-scoped tasks for easier development across services.
task installInstalls dependencies for enter, text and image servicestask devRuns dev servers for enter, text and image services with automatic restart on code changes