Worker doesn't work on Deployment
Hey @charles
In the package.json, the command "start": "npx nx run-many -t start worker -p twenty-server twenty-front" works locally to start the worker, but it doesn't work in the deployment version. Is there a change required in the Dockerfile to make it work in the deployed environment?
4 Replies
Hi @anjali, you do not want to use nx in production (this is a development monorepo tool). To self-host Twenty you will need to run everthing in production mode and you will need to run independently your server and worker.
See here: https://twenty.com/developers/section/self-hosting/docker-compose
Also see our docker-compose example: https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-docker/docker-compose.yml, we are running two containers one for the server and one for the worker
Hi @charles Instead of docker-compose can we do that with docker file? Our deployment is on AWS ECS with EC2.
docker compose points to Docker images so yes it should not be an issue
but it seems that docker-compose is supported: https://dev.to/raphaelmansuy/10-minutes-to-deploy-a-docker-compose-stack-on-aws-illustrated-with-hasura-and-postgres-3f6e
DEV Community
10 minutes to deploy a Docker compose stack on AWS ECS illustrated ...
Introduction The ecs-cli command is a little gem 💎 👉 ecs-cli allows you to deploy a Docke...