Amiteshwar
Amiteshwar
TTwenty
Created by Amiteshwar on 4/17/2025 in #❓︱help
Docker Compose can't connect to PostgreSQL in AWS RDS
Hey, I was able to run my modified twenty code (very lightweight modifications -- not adding new dependencies) locally with the 3 npx commands for server, worker and frontend. Next, I wanted to build it with Docker and use my PostgreSQL database in AWS RDS. So, I ran the Dockerfile (in twenty-docker/twenty). Then, built a new Docker image and used that image (since I had locally made changes to the code) for the docker-compose.yml file (in 'server' & worker 'services') - the only change I made to docker-compose.yml. But, when I run docker compose up, I keep on getting these errors (NOTES at the bottom): [Nest] 1 - 04/17/2025, 2:58:37 AM ERROR [TypeOrmModule] Unable to connect to the database (metadata). Retrying (1)... Error: connect ECONNREFUSED ::1:5432 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) [Nest] 1 - 04/17/2025, 2:58:37 AM ERROR [TypeOrmModule] Unable to connect to the database (core). Retrying (1)... Error: connect ECONNREFUSED ::1:5432 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) [Nest] 1 - 04/17/2025, 2:58:37 AM ERROR [ExceptionHandler] connect ECONNREFUSED ::1:6379 Error: connect ECONNREFUSED ::1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) NOTES: 1. The db credentials are correct - I verified & can connect to my instance RDS. 2. The RDS instance is correctly configured to receive inbound traffic. 3. I only made 2 changes (mentioned above) to the default docker-compose.yml. Do I need to modify the 'db' service since I'm using my own db instead of the built-in one? Update: I removed 'db' to use my own database but still same issue. 4. docker-compose.yml seems to be pointing to localhost as if something is overriding all my settings about remote db. 5. I verified that my docker-compose.yml file can read from .env file. I even ran with actual details in the yml but same errors. 6. Looking specifically at 'metadata' and 'core' in the error, I even created a database named 'default' in RDS. I also created schemas named 'core' and 'metadata' in the 'default' database. But, still same error. 7. I ran the added the PG_DATABASE_URL env variable during docker build to include it as a build variable. But, still same error. 8. this is my REDIS_URL: redis://redis:6379 How can i fix this? I'd appreciate any help!
4 replies
TTwenty
Created by Amiteshwar on 4/13/2025 in #❓︱help
Can't add/edit Objects with Admin role
Hi, I added admin privileges for 2 users. These users are able to do everything but can't create/edit objects. But what's weird is that these 2 userIds have Admin access for their workspaces. I'm using google login with access to 5 people and 2 admins. In settings > workspace > data model: 1. they don't see Add Object button 2. they don't see 'Save' button when editting/adding a field When using twenty code as is, I'm able to add/edit objects. What could be the reason?
5 replies
TTwenty
Created by Amiteshwar on 4/10/2025 in #❓︱help
Architecture to Google OAuth
Hi, I'm trying to self-host twenty and add auth that restricts Google Sign in to specific email addresses with a new login page. I'm getting errors in docker. Here's what I did: 1. Created twenty-auth-backend package with an emails guard. In twenty-server: Added guard to google-auth.controller.ts. Added providers to app.module.ts 2. Created twenty-auth-frontend package with a custom login page. In twenty-front: Created custom Sign In Page (src/pages/auth/_custom-sign-in-up.tsx). Modified router in useCreateAppRouter.tsx For running the code, I modified the docker-compse.yml accordingly. But keep getting errors. I would really appreciate any help!
10 replies