Skip to content

Errors while trying to deploy with docker #116

@amgno

Description

@amgno

image

nextjs-app-1  | sql get error: password authentication failed for user "postgres" 
postgres-1    | 2024-06-26 12:18:56.804 UTC [37] FATAL:  password authentication failed for user "postgres"
nextjs-app-1  | sql get error: password authentication failed for user "postgres" 
nextjs-app-1  | sql get error: password authentication failed for user "postgres" 
nextjs-app-1  | sql get error: password authentication failed for user "postgres" 
postgres-1    | 2024-06-26 12:18:56.804 UTC [37] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
nextjs-app-1  | sql get error: password authentication failed for user "postgres" 
nextjs-app-1  | sql get error: password authentication failed for user "postgres" 
postgres-1    | 2024-06-26 12:18:56.804 UTC [36] FATAL:  password authentication failed for user "postgres"
postgres-1    | 2024-06-26 12:18:56.804 UTC [36] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
postgres-1    | 2024-06-26 12:18:56.804 UTC [38] FATAL:  password authentication failed for user "postgres"
postgres-1    | 2024-06-26 12:18:56.804 UTC [38] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
postgres-1    | 2024-06-26 12:18:56.804 UTC [34] FATAL:  password authentication failed for user "postgres"
nextjs-app-1  | sql get error: password authentication failed for user "postgres" 
postgres-1    | 2024-06-26 12:18:56.804 UTC [34] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
postgres-1    | 2024-06-26 12:18:56.804 UTC [35] FATAL:  password authentication failed for user "postgres"
postgres-1    | 2024-06-26 12:18:56.804 UTC [35] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
postgres-1    | 2024-06-26 12:18:56.804 UTC [39] FATAL:  password authentication failed for user "postgres"
postgres-1    | 2024-06-26 12:18:56.804 UTC [39] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
postgres-1    | 2024-06-26 12:18:56.804 UTC [40] FATAL:  password authentication failed for user "postgres"
postgres-1    | 2024-06-26 12:18:56.804 UTC [40] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
postgres-1    | 2024-06-26 12:18:56.805 UTC [33] FATAL:  password authentication failed for user "postgres"
postgres-1    | 2024-06-26 12:18:56.805 UTC [33] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
postgres-1    | 2024-06-26 12:18:57.237 UTC [41] FATAL:  password authentication failed for user "postgres"
postgres-1    | 2024-06-26 12:18:57.237 UTC [41] DETAIL:  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"

.env file:

POSTGRES_URL="postgresql://postgres:postgres@postgres:5432/postgres"
DISABLE_POSTGRES_SSL=1

Docker-compose file:

version: '3.9'

services:
  nextjs-app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    depends_on:
      - postgres

  postgres:
    image: 'postgres:latest'
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: postgres
    ports:
      - '5432:5432'
    volumes:
      - postgres-data:/var/lib/postgresql/data

volumes:
  postgres-data:

Dockerfile:

FROM node

WORKDIR /app

RUN npm install -g pnpm

COPY . .

RUN pnpm install


EXPOSE 3000


CMD ["npm", "run", "dev"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions