From 4b2d02eca86cb097e472a8a5ff6c384cdca7bbd4 Mon Sep 17 00:00:00 2001 From: aserrador Date: Thu, 26 Feb 2026 21:24:02 -0500 Subject: [PATCH] feat: Add database messages --- docker-compose.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docker-compose.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..e9e2e9a --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,22 @@ +services: + messages_db: + image: postgres:latest + environment: + - POSTGRES_USER=${POSTGRES_USER:-postgres} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} + - POSTGRES_DB=${POSTGRES_DB:-messages} + ports: + - "5432:5432" + volumes: + - data:/var/lib/postgresql + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-messages}"] + interval: 5s + timeout: 5s + retries: 5 + start_period: 10s + env_file: + - .env + +volumes: + data: \ No newline at end of file