Docker – pgvector – Run PostgreSQL with pgvector in Docker Compose

pgvector docker compose : piles de conteneurs dans un port sous un ciel bleu

The official postgres Docker image does not include pgvector. To run PostgreSQL with pgvector locally, use the pgvector/pgvector image: it is the same postgres image, with the extension already installed. Here is a minimal pgvector docker compose file, tested with PostgreSQL 18. The pgvector docker compose file services: db: image: pgvector/pgvector:pg18 environment: POSTGRES_USER: app POSTGRES_PASSWORD: … Read more

RAG explained to my mum

Old library with ladder, metaphor for RAG explained simply

Imagine someone who has read every university library in Switzerland. They can answer almost any general knowledge question. But if you ask them what happened at your place last week, or what’s in your internal documents, they have no idea. They weren’t there, and no one showed them. That’s RAG explained simply: the gap this … Read more

A Chrome extension to find unanswered WhatsApp chats

Person holding a smartphone showing a messaging app — illustration for an article about a Chrome extension to find unanswered WhatsApp chats

I recently opened WhatsApp Web and counted: 52 conversations where someone was waiting on a reply from me, lost in hundreds of group chats and notifications. The native filter strip (All / Unread / Favorites / Groups) does not have a “to reply” view. Unread only catches genuinely unread messages, not the ones I opened … Read more

Symfony – Debug the value of an environment variable

In Symfony you can define some configuration in the .env file. To be sure of the value the program actually receives at runtime, there is the following command php bin/console debug:container –env-var=DATABASE_URL –env=test With this command you can easily see the value Symfony uses php bin/console debug:container –env-var=DATABASE_URL Symfony Container Environment Variables ======================================= // Displaying … Read more

Symfony – Doctrine – How to see where an SQL query is executed

MacBook avec code sur un bureau

When using Doctrine, it is sometimes important to find where an SQL query is executed. Just turn on profiling_collect_backtrace on the connection, in the development configuration (config/packages/dev/doctrine.yaml): doctrine: dbal: connections: default: profiling_collect_backtrace: true Keep it for development only: collecting the call stack on every query is expensive. It relies on profiling, which is on by … Read more

Drupal 7: Create a datetime field in a schema with db_create_table

To create a table in Drupal 7, you can use the “my_module_update_7000” hook in the “my_module.install” file. The datetime type is unfortunately not mapped, which is why you have to use the “mysql_type” key const MY_MODULE_TABLE_NAME = ‘my_module_table’; function get_my_module_schema(): array { return [ ‘description’ => ‘description’, ‘fields’ => [ ‘id’ => [‘type’ => ‘serial’, … Read more