Django + Tailwind + Django Q
valeriuv
PROOP
2 years ago
I have 2 services running from the same repo: main django app and a duplicate service of that for Django Q background tasks. Previously each had their own start command set in settings. Now I installed Tailwind and apparently had to specify the startCommand in railway.json:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"providers": ["python"],
"phases": {
"setup": {
"nixPkgs": ["...", "nodejs-18_x"]
}
},
"buildCommand": "npm ci"
}
},
"deploy": {
"startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && (python manage.py qcluster &) && gunicorn fleetdata.wsgi",
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}The problem is that now Q Cluster is running on both services and the option to specify separate start commands is disabled. How can I make sure the Q cluster only runs on it's service?
1 Replies
valeriuv
PROOP
2 years ago
Nevermind, removed the startCommand from railway.json and it's working as expected. Not sure which AI told me to put it there.
Status changed to Solved brody • over 1 year ago