From 121872878b64a6553951655667cadc2ba580bdf1 Mon Sep 17 00:00:00 2001 From: Daniel Ervik Riiber Date: Fri, 9 Oct 2026 11:22:00 +0200 Subject: [PATCH 1/3] docs/db: Installed postgreSQL on server and documented the install process --- docs/postgresql-setup.md | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/postgresql-setup.md diff --git a/docs/postgresql-setup.md b/docs/postgresql-setup.md new file mode 100644 index 0000000..9a236b8 --- /dev/null +++ b/docs/postgresql-setup.md @@ -0,0 +1,55 @@ +# PostgreSQL setup/install + +## VM needed cleanup +The VM was full, no avialable storage. The install failed first time. +Before: +``` +$ df -h / +Filesystem Size Used Avail Use% Mounted on +/dev/mapper/ubuntu--vg-ubuntu--lv 22G 21G 0 100% / +``` + +Commands i used to get back some storage space. +``` +sudo apt-get clean +sudo journalctl --vacuum-size=100M +sudo apt-get autoremove --purge && sudo apt-get autoclean +``` + +After: +``` +Filesystem Size Used Avail Use% Mounted on +/dev/mapper/ubuntu--vg-ubuntu--lv 22G 19G 2.0G 91% / +``` + +## Installing PostgreSQL +``` +apt install postgresql +``` + +Check that it is running +``` +$ systemctl status postgresql +● postgresql.service - PostgreSQL RDBMS + Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: enabled) + Active: active (exited) since Fri 2026-10-09 10:45:03 CEST; 1min 2s ago + Invocation: 53a72781a00d4fe89442166a499e2145 + Main PID: 1823221 (code=exited, status=0/SUCCESS) + Mem peak: 1.7M + CPU: 4ms +``` +``` +$ pg_isready +/var/run/postgresql:5432 - accepting connections +$ sudo ss -ltnp | grep 5432 +LISTEN 0 200 127.0.0.1:5432 0.0.0.0:* users:(("postgres",pid=1824131,fd=6)) +$ sudo -u postgres psql +psql (18.6 (Ubuntu 18.6-0ubuntu0.26.04.1)) +Type "help" for help. + +postgres=# SELECT version(); + version +--------------------------------------------------------------------------------------------------------------------------------- + PostgreSQL 18.6 (Ubuntu 18.6-0ubuntu0.26.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0, 64-bit +``` + From b8187a2282d94d58a09d3ab52f06e461c03bda99 Mon Sep 17 00:00:00 2001 From: Daniel Ervik Riiber Date: Fri, 9 Oct 2026 11:22:51 +0200 Subject: [PATCH 2/3] docs: Added documentation on how the db can be managed remotely --- docs/postgresql-management.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/postgresql-management.md diff --git a/docs/postgresql-management.md b/docs/postgresql-management.md new file mode 100644 index 0000000..8e043a4 --- /dev/null +++ b/docs/postgresql-management.md @@ -0,0 +1,27 @@ +# Manage Postgresql database +SSH into the VM to manage the database. There is currntly no exposed postgreSQL ports for remote management other than trough SSH. + +## Connect to the database and run queries. +Run as the postgres system user. Use your user account password if sudo requests it. +``` +sudo -u postgres psql +``` + +Run a sinlge query +``` +sudo -u postgres psql -c "SELECT example FROM EXAMPLE;" +``` + +## Some handful commands inside psql — meta-commands +| Command | What it does | +| --- | --- | +| `\l` | List all databases | +| `\c mydb` | Switch to another database | +| `\dt` | List tables in the current schema | +| `\d mytable` | Describe a table (columns, types, indexes) | +| `\du` | List roles/users and their privileges | +| `\dn` | List schemas | +| `\x` | Toggle expanded row display (great for wide rows) | +| `\timing` | Show how long each query takes | +| `\i script.sql` | Execute a SQL file | +| `\q` | Quit | \ No newline at end of file From 3a4061d213e75a8541dbf9f0a1197ecb0a1ecdca Mon Sep 17 00:00:00 2001 From: Daniel Ervik Riiber Date: Fri, 9 Oct 2026 11:24:59 +0200 Subject: [PATCH 3/3] docs: Added my recent ai usage --- docs/AI-Usage.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/AI-Usage.md b/docs/AI-Usage.md index de6966d..16b9607 100644 --- a/docs/AI-Usage.md +++ b/docs/AI-Usage.md @@ -5,6 +5,7 @@ AI is prone to halucinations and mistakes, therefore will AI used in a thoughtfu ## Tools used Different group members use different harnesses and models, according to personal preference. * Mistral Vibe Code CLI +* Mistral Vibe Work ## Summary of how AI was used ... @@ -14,4 +15,6 @@ Different group members use different harnesses and models, according to persona | --- | --- | ---- | ------------ | | 29.09.2026 | Daniel | Mistral Vibe Work, Mistral Vibe Code CLI | Critize my PRD in context of best practices and project description | | 29.09.2026 | Daniel | Mistral Vibe Work | Find fitting labels for issues and PRs for the project | +| 9.10.2026 | Daniel | Mistral Vibe Work | Help with freeing disk space on VM and make a list over usefull postgreSQL command | +