Skip to content

A Spectro Cloud demo application. This is the database that supports the Hello Universe app.

License

Notifications You must be signed in to change notification settings

spectrocloud/hello-universe-db

Repository files navigation

semantic-release: angular

Hello Universe DB

A Spectro Cloud demo application. This is the database that supports the Hello Universe API.

drawing

Overview

The Hello Universe app includes an API server that relies on a Postgres database for storing the number of events and other metadata about the events such as the browser, os, and timestamp. For your convenience, a Postgres container is available for use.

Prerequisites

Ensure Docker Desktop is available on your local machine.

  • Use the following command and ensure you receive an output displaying the version number.
    docker version
    

Alternatively, you can install Podman.

  • If you are not using a Linux operating system, create and start the Podman Machine in your local environment. Otherwise, skip this step.
    podman machine init
    podman machine start
    
  • Use the following command and ensure you receive an output displaying the installation information.
    podman info
    

Usage

You can issue the following commands to use the container with Docker.

docker pull ghcr.io/spectrocloud/hello-universe-db:1.1.0 && \
docker run -p 5432:5432 ghcr.io/spectrocloud/hello-universe-db:1.1.0

If you choose Podman, you can use the following commands.

podman pull ghcr.io/spectrocloud/hello-universe-db:1.1.0 && \
podman run -p 5432:5432 ghcr.io/spectrocloud/hello-universe-db:1.1.0

The command you issued downloaded the container and exposed port 5432. The default user name is postgres and the password is password.

Database Schema

The database uses the following schema for the counter table.

Field Description Type
id The primary key. Number
page The page associated with the event. Varchar
date The timestamp of the event. Timestamp
browser The client web browser. Varchar
os The client operating system. Varchar

Image Verification

We sign our images through Cosign. Review the Image Verification page to learn more.