Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose up fails #1232

Open
metalshanked opened this issue Jun 14, 2024 · 1 comment
Open

docker-compose up fails #1232

metalshanked opened this issue Jun 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@metalshanked
Copy link

System Info

pandas 2.2

馃悰 Describe the bug

get the below error when following the steps to run the platform with docker compose as mentioned in the docs.

I think the postgres container is listening on 5430:5432 so the default settings fail as below.

pandabi-backend | raise OSError(err, f'Connect call failed {address}')
pandabi-backend | ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 5432)

@dosubot dosubot bot added the bug Something isn't working label Jun 14, 2024
Copy link

dosubot bot commented Jun 14, 2024

To resolve the issue where the PostgreSQL container is listening on port 5430:5432, causing the default settings to fail, you need to update the port mapping in your docker-compose.yml file to use the default PostgreSQL port 5432:5432.

Here is the updated docker-compose.yml configuration:

services:
  postgresql:
    image: postgres:14.2-alpine
    environment:
      POSTGRES_USER: pandasai
      POSTGRES_PASSWORD: password123
      POSTGRES_DB: pandasai-db
    ports:
      - "5432:5432"
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    networks:
      - pandabi-network

  server:
    container_name: pandabi-backend
    build:
      context: ./server
      dockerfile: Dockerfile
    ports:
      - "8000:8000"
    restart: always
    env_file:
      - ./server/.env
    depends_on:
      - postgresql
    networks:
      - pandabi-network
    command: "/bin/bash startup.sh"

  client:
    container_name: pandabi-frontend
    build:
      context: ./client
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    restart: always
    env_file:
      - ./client/.env
    environment:
      - NODE_ENV=development
    command: npm run start
    networks:
      - pandabi-network

networks:
  pandabi-network:
    driver: bridge

By changing the port mapping from 5430:5432 to 5432:5432, the PostgreSQL container will listen on the default port 5432, which should resolve the issue with the default settings [1].

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant