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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds missing config file #33

Closed

Conversation

DanRoscigno
Copy link
Contributor

The docs for this lab mention the Postgres bootstrap file, but do not provide instructions for downloading it. This PR adds a configs section to the docker-compose.yml and mounts the config in the right place.

It also corrects the healthcheck for Postgres, it was looking for the wrong database.

Original log from the Postgres service

postgres  | PostgreSQL init process complete; ready for start up.
postgres  |
postgres  | 2024-04-30 18:01:45.268 UTC [1] LOG:  starting PostgreSQL 16.2 (Debian 16.2-1.pgdg110+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
postgres  | 2024-04-30 18:01:45.268 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres  | 2024-04-30 18:01:45.268 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres  | 2024-04-30 18:01:45.271 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres  | 2024-04-30 18:01:45.272 UTC [64] LOG:  database system was shut down at 2024-04-30 18:01:45 UTC
postgres  | 2024-04-30 18:01:45.274 UTC [1] LOG:  database system is ready to accept connections
postgres  | 2024-04-30 18:01:46.332 UTC [75] FATAL:  database "shipment_db" does not exist

Updated log showing the creation of the orders table in the pandashop DB

postgres  | 2024-04-30 18:47:15.426 UTC [48] LOG:  database system is ready to accept connections
postgres  |  done
postgres  | server started
postgres  | CREATE DATABASE
postgres  |
postgres  |
postgres  | /usr/local/bin/docker-entrypoint.sh: sourcing /docker-entrypoint-initdb.d/init-permissions.sh
postgres  |
postgres  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/postgres_bootstrap.sql
postgres  | CREATE TABLE
postgres  | INSERT 0 1
postgres  | INSERT 0 1
postgres  | INSERT 0 1
postgres  | INSERT 0 1
postgres  | INSERT 0 1
postgres  |
postgres  |
postgres  | 2024-04-30 18:47:15.591 UTC [48] LOG:  received fast shutdown request
postgres  | waiting for server to shut down....2024-04-30 18:47:15.592 UTC [48] LOG:  aborting any active transactions
postgres  | 2024-04-30 18:47:15.593 UTC [48] LOG:  background worker "logical replication launcher" (PID 54) exited with exit code 1
postgres  | 2024-04-30 18:47:15.593 UTC [49] LOG:  shutting down
postgres  | 2024-04-30 18:47:15.596 UTC [49] LOG:  checkpoint starting: shutdown immediate
postgres  | 2024-04-30 18:47:15.618 UTC [49] LOG:  checkpoint complete: wrote 932 buffers (5.7%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.007 s, sync=0.014 s, total=0.025 s; sync files=304, longest=0.006 s, average=0.001 s; distance=4272 kB, estimate=4272 kB; lsn=0/19DA968, redo lsn=0/19DA968
postgres  | 2024-04-30 18:47:15.620 UTC [48] LOG:  database system is shut down
postgres  |  done
postgres  | server stopped
postgres  |
postgres  | PostgreSQL init process complete; ready for start up.
postgres  |
postgres  | 2024-04-30 18:47:15.701 UTC [1] LOG:  starting PostgreSQL 16.2 (Debian 16.2-1.pgdg110+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
postgres  | 2024-04-30 18:47:15.701 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres  | 2024-04-30 18:47:15.701 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres  | 2024-04-30 18:47:15.713 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres  | 2024-04-30 18:47:15.721 UTC [66] LOG:  database system was shut down at 2024-04-30 18:47:15 UTC
postgres  | 2024-04-30 18:47:15.722 UTC [1] LOG:  database system is ready to accept connections

Signed-off-by: DanRoscigno <dan@roscigno.com>
@DanRoscigno DanRoscigno marked this pull request as draft April 30, 2024 19:04
Copy link

netlify bot commented Apr 30, 2024

Deploy Preview for redpanda-labs-preview ready!

Name Link
🔨 Latest commit 032e73a
🔍 Latest deploy log https://app.netlify.com/sites/redpanda-labs-preview/deploys/663140b73b01ff0008af98e7
😎 Deploy Preview https://deploy-preview-33--redpanda-labs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@DanRoscigno
Copy link
Contributor Author

It looks like this is fixed in main, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant