thangchung / go-coffeeshop

☕ A practical event-driven microservices demo built with Golang. Nomad, Consul Connect, Vault, and Terraform for deployment
MIT License
4.09k stars 411 forks source link

Empty web page with docker-compose #17

Closed thangtv611 closed 1 year ago

thangtv611 commented 1 year ago

Setting:

Windows:

Edition Windows 10 Pro
Version 21H2
Installed on    ‎9/‎3/‎2022
OS build    19044.2251
Experience  Windows Feature Experience Pack 120.2212.4180.0

Docker:

v4.15.0

Command:

docker-compose -f docker-compose-full.yaml up

Result

Capture

image

image

image

image

Look like problem with Postres?

2022-12-03 08:53:51 The files belonging to this database system will be owned by user "postgres".
2022-12-03 08:53:51 This user must also own the server process.
2022-12-03 08:53:51 
2022-12-03 08:53:51 The database cluster will be initialized with locale "en_US.utf8".
2022-12-03 08:53:51 The default database encoding has accordingly been set to "UTF8".
2022-12-03 08:53:51 The default text search configuration will be set to "english".
2022-12-03 08:53:51 
2022-12-03 08:53:51 Data page checksums are disabled.
2022-12-03 08:53:51 
2022-12-03 08:53:51 fixing permissions on existing directory /var/lib/postgresql/data ... ok
2022-12-03 08:53:51 creating subdirectories ... ok
2022-12-03 08:53:51 selecting dynamic shared memory implementation ... posix
2022-12-03 08:53:51 selecting default max_connections ... 100
2022-12-03 08:53:51 selecting default shared_buffers ... 128MB
2022-12-03 08:53:51 selecting default time zone ... UTC
2022-12-03 08:53:51 creating configuration files ... ok
2022-12-03 08:53:51 running bootstrap script ... ok
2022-12-03 08:53:51 performing post-bootstrap initialization ... ok
2022-12-03 08:53:53 syncing data to disk ... ok
2022-12-03 08:53:53 
2022-12-03 08:53:53 
2022-12-03 08:53:53 Success. You can now start the database server using:
2022-12-03 08:53:53 
2022-12-03 08:53:53     pg_ctl -D /var/lib/postgresql/data -l logfile start
2022-12-03 08:53:53 
2022-12-03 08:53:53 waiting for server to start....2022-12-03 01:53:53.255 UTC [36] LOG:  starting PostgreSQL 14.6 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
2022-12-03 08:53:53 2022-12-03 01:53:53.260 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-12-03 08:53:53 2022-12-03 01:53:53.273 UTC [37] LOG:  database system was shut down at 2022-12-03 01:53:51 UTC
2022-12-03 08:53:53 2022-12-03 01:53:53.278 UTC [36] LOG:  database system is ready to accept connections
2022-12-03 08:53:53  done
2022-12-03 08:53:53 server started
2022-12-03 08:53:53 
2022-12-03 08:53:53 /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2022-12-03 08:53:53 
2022-12-03 08:53:53 waiting for server to shut down...2022-12-03 01:53:53.352 UTC [36] LOG:  received fast shutdown request
2022-12-03 08:53:53 .2022-12-03 01:53:53.356 UTC [36] LOG:  aborting any active transactions
2022-12-03 08:53:53 2022-12-03 01:53:53.357 UTC [36] LOG:  background worker "logical replication launcher" (PID 43) exited with exit code 1
2022-12-03 08:53:53 2022-12-03 01:53:53.357 UTC [38] LOG:  shutting down
2022-12-03 08:53:53 2022-12-03 01:53:53.393 UTC [36] LOG:  database system is shut down
2022-12-03 08:53:53  done
2022-12-03 08:53:53 server stopped
2022-12-03 08:53:53 
2022-12-03 08:53:53 PostgreSQL init process complete; ready for start up.
2022-12-03 08:53:53 
2022-12-03 08:53:51 sh: locale: not found
2022-12-03 08:53:51 2022-12-03 01:53:51.628 UTC [30] WARNING:  no usable system locales were found
2022-12-03 08:53:53 initdb: warning: enabling "trust" authentication for local connections
2022-12-03 08:53:53 You can change this by editing pg_hba.conf or using the option -A, or
2022-12-03 08:53:53 --auth-local and --auth-host, the next time you run initdb.
2022-12-03 08:53:53 2022-12-03 01:53:53.469 UTC [1] LOG:  starting PostgreSQL 14.6 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
2022-12-03 08:53:53 2022-12-03 01:53:53.469 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-12-03 08:53:53 2022-12-03 01:53:53.469 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2022-12-03 08:53:53 2022-12-03 01:53:53.477 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-12-03 08:53:53 2022-12-03 01:53:53.485 UTC [48] LOG:  database system was shut down at 2022-12-03 01:53:53 UTC
2022-12-03 08:53:53 2022-12-03 01:53:53.490 UTC [1] LOG:  database system is ready to accept connections
2022-12-03 08:54:21 2022-12-03 01:54:21.186 UTC [62] FATAL:  role "root" does not exist
2022-12-03 08:54:51 2022-12-03 01:54:51.253 UTC [102] FATAL:  role "root" does not exist
2022-12-03 08:55:21 2022-12-03 01:55:21.334 UTC [110] FATAL:  role "root" does not exist
2022-12-03 08:55:51 2022-12-03 01:55:51.423 UTC [117] FATAL:  role "root" does not exist
2022-12-03 08:56:21 2022-12-03 01:56:21.514 UTC [125] FATAL:  role "root" does not exist
2022-12-03 08:56:51 2022-12-03 01:56:51.593 UTC [132] FATAL:  role "root" does not exist
2022-12-03 08:57:21 2022-12-03 01:57:21.714 UTC [140] FATAL:  role "root" does not exist
2022-12-03 08:57:51 2022-12-03 01:57:51.796 UTC [147] FATAL:  role "root" does not exist
duonghaichau commented 1 year ago

I got same issue. Reproducible on MacOS.

sadensmol commented 1 year ago

same issue, macos.

flermise-echo commented 1 year ago

By modifying docker-compose-full.yaml line11 to test: ["CMD-SHELL", "pg_isready -U postgres"] line128 to WEB_PORT: 8080 the project can be run.

thangtv611 commented 1 year ago

By modifying docker-compose-full.yaml line11 to test: ["CMD-SHELL", "pg_isready -U postgres"] line128 to WEB_PORT: 8080 the project can be run.

It work. Many thanks

zztczcx commented 1 year ago

shouldn't this fix merged into master?