Giter Club home page Giter Club logo

Comments (6)

Shchepotin avatar Shchepotin commented on May 21, 2024
root@iZ2ze8qk0bio1k49bk5lrrZ:~/project/my-app# docker compose logs
my-app-postgres-1  | 
my-app-postgres-1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
my-app-postgres-1  | 

@hankaibo you need to change password in database directly or remove .data/db folder and run docker compose up -d again

from nestjs-boilerplate.

hankaibo avatar hankaibo commented on May 21, 2024

@Shchepotin thanks replying.

✔ Container my-app-adminer-1   Started                                                                                                                                                                                                                                2.1s 
 ✔ Container my-app-api-1       Started                                                                                                                                                                                                                                2.2s 
 ✔ Container my-app-maildev-1   Started                                                                                                                                                                                                                                2.2s 
 ✔ Container my-app-postgres-1  Started                                                                                                                                                                                                                                2.2s 
root@iZ2ze8qk0bio1k49bk5lrrZ:~/project/my-app# docker compose logs 
my-app-postgres-1  | The files belonging to this database system will be owned by user "postgres". 
my-app-postgres-1  | This user must also own the server process.
my-app-postgres-1  | 
my-app-postgres-1  | The database cluster will be initialized with locale "en_US.utf8".
my-app-postgres-1  | The default database encoding has accordingly been set to "UTF8".
my-app-postgres-1  | The default text search configuration will be set to "english".
my-app-postgres-1  | 
my-app-postgres-1  | Data page checksums are disabled.
my-app-postgres-1  | 
my-app-postgres-1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok       
my-app-postgres-1  | creating subdirectories ... ok
my-app-postgres-1  | selecting dynamic shared memory implementation ... posix
my-app-postgres-1  | selecting default max_connections ... 100
my-app-postgres-1  | selecting default shared_buffers ... 128MB
my-app-postgres-1  | selecting default time zone ... UTC
my-app-postgres-1  | creating configuration files ... ok
my-app-postgres-1  | running bootstrap script ... ok
my-app-postgres-1  | sh: locale: not found
my-app-postgres-1  | 2023-08-08 01:01:45.795 UTC [31] WARNING:  no usable system locales were found 
my-app-postgres-1  | performing post-bootstrap initialization ... ok
my-app-postgres-1  | syncing data to disk ... ok
my-app-postgres-1  | 
my-app-postgres-1  | initdb: warning: enabling "trust" authentication for local connections
my-app-postgres-1  | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
my-app-postgres-1  |  
my-app-postgres-1  | Success. You can now start the database server using:
my-app-postgres-1  | 
my-app-postgres-1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
my-app-postgres-1  | 
my-app-postgres-1  | waiting for server to start....2023-08-08 01:01:47.139 UTC [37] LOG:  starting PostgreSQL 15.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
my-app-postgres-1  | 2023-08-08 01:01:47.142 UTC [37] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
my-app-postgres-1  | 2023-08-08 01:01:47.153 UTC [40] LOG:  database system was shut down at 2023-08-08 01:01:46 UTC
my-app-postgres-1  | 2023-08-08 01:01:47.159 UTC [37] LOG:  database system is ready to accept connections
my-app-postgres-1  |  done
my-app-postgres-1  | server started
my-app-postgres-1  | CREATE DATABASE
my-app-postgres-1  | 
my-app-postgres-1  | 
my-app-postgres-1  | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
my-app-postgres-1  | 
my-app-postgres-1  | 2023-08-08 01:01:47.356 UTC [37] LOG:  received fast shutdown request
my-app-postgres-1  | waiting for server to shut down....2023-08-08 01:01:47.360 UTC [37] LOG:  aborting any active transactions
my-app-postgres-1  | 2023-08-08 01:01:47.364 UTC [37] LOG:  background worker "logical replication launcher" (PID 43) exited with exit code 1
my-app-postgres-1  | 2023-08-08 01:01:47.364 UTC [38] LOG:  shutting down
my-app-postgres-1  | 2023-08-08 01:01:47.367 UTC [38] LOG:  checkpoint starting: shutdown immediate
my-app-postgres-1  | 2023-08-08 01:01:47.483 UTC [38] LOG:  checkpoint complete: wrote 918 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.082 s, sync=0.021 s, total=0.119 s; sync files=250, longest=0.004 s, average=0.001 s; distance=4222 kB, estimate=4222 kB
my-app-postgres-1  | 2023-08-08 01:01:47.489 UTC [37] LOG:  database system is shut down
my-app-postgres-1  |  done
my-app-postgres-1  | server stopped
my-app-postgres-1  | 
my-app-postgres-1  | PostgreSQL init process complete; ready for start up.
my-app-postgres-1  | 
my-app-postgres-1  | 2023-08-08 01:01:47.584 UTC [1] LOG:  starting PostgreSQL 15.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
my-app-postgres-1  | 2023-08-08 01:01:47.585 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
my-app-postgres-1  | 2023-08-08 01:01:47.585 UTC [1] LOG:  listening on IPv6 address "::", port 5432
my-app-postgres-1  | 2023-08-08 01:01:47.591 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
my-app-postgres-1  | 2023-08-08 01:01:47.599 UTC [53] LOG:  database system was shut down at 2023-08-08 01:01:47 UTC
my-app-postgres-1  | 2023-08-08 01:01:47.606 UTC [1] LOG:  database system is ready to accept connections
my-app-postgres-1  | 2023-08-08 01:01:56.490 UTC [58] FATAL:  password authentication failed for user "root"
my-app-postgres-1  | 2023-08-08 01:01:56.490 UTC [58] DETAIL:  Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"
my-app-adminer-1   | [Tue Aug  8 01:01:43 2023] PHP 7.4.27 Development Server (http://[::]:8080) started
my-app-api-1       | wait-for-it.sh: waiting 15 seconds for postgres:5432
my-app-api-1       | wait-for-it.sh: postgres:5432 is available after 4 seconds
my-app-api-1       | 
my-app-api-1       | > [email protected] migration:run
my-app-api-1       | > npm run typeorm -- --dataSource=src/database/data-source.ts migration:run
my-app-api-1       | 
my-app-api-1       | 
my-app-api-1       | > [email protected] typeorm
my-app-api-1       | > env-cmd ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js --dataSource=src/database/data-source.ts migration:run
my-app-api-1       | 
my-app-api-1       | Error during migration run:
my-app-api-1       | error: password authentication failed for user "root"
my-app-api-1       |     at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/src/parser.ts:369:69)
my-app-api-1       |     at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/src/parser.ts:188:21)
my-app-api-1       |     at Parser.parse (/usr/src/app/node_modules/pg-protocol/src/parser.ts:103:30)
my-app-api-1       |     at Socket.<anonymous> (/usr/src/app/node_modules/pg-protocol/src/index.ts:7:48)
my-app-api-1       |     at Socket.emit (node:events:514:28)
my-app-api-1       |     at Socket.emit (node:domain:489:12)
my-app-api-1       |     at addChunk (node:internal/streams/readable:324:12)
my-app-api-1       |     at readableAddChunk (node:internal/streams/readable:297:9)
my-app-api-1       |     at Socket.Readable.push (node:internal/streams/readable:234:10)
my-app-api-1       |     at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
my-app-api-1       |   length: 100,
my-app-api-1       |   severity: 'FATAL',
my-app-api-1       |   code: '28P01',
my-app-api-1       |   detail: undefined, 
my-app-api-1       |   hint: undefined,
my-app-api-1       |   position: undefined,
my-app-api-1       |   internalPosition: undefined,
my-app-api-1       |   internalQuery: undefined,
my-app-api-1       |   where: undefined,
my-app-api-1       |   schema: undefined,
my-app-api-1       |   table: undefined,
my-app-api-1       |   column: undefined,
my-app-api-1       |   dataType: undefined,
my-app-api-1       |   constraint: undefined,
my-app-api-1       |   file: 'auth.c',
my-app-api-1       |   line: '326',
my-app-api-1       |   routine: 'auth_failed'
my-app-api-1       | }
my-app-maildev-1   | MailDev using directory /tmp/maildev-1
my-app-maildev-1   | MailDev webapp running at http://0.0.0.0:1080
my-app-maildev-1   | MailDev SMTP Server running at 0.0.0.0:1025
root@iZ2ze8qk0bio1k49bk5lrrZ:~/project/my-app#

Above is the log from my rebuild, still reporting the error.

from nestjs-boilerplate.

Shchepotin avatar Shchepotin commented on May 21, 2024

@hankaibo I can't reproduce your problem. Please try install nest-boilerplate from scratch ant let me know if this help you

from nestjs-boilerplate.

hankaibo avatar hankaibo commented on May 21, 2024

Have you changed your password?

from nestjs-boilerplate.

Shchepotin avatar Shchepotin commented on May 21, 2024

@hankaibo sorry, nestjs-boilerplate really had problem with .env file on docker compose up.

Please make changes to your project as in these files and try again.

from nestjs-boilerplate.

hankaibo avatar hankaibo commented on May 21, 2024

You are my God, thanks.

from nestjs-boilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.