From 0c39f6141bc68b9c36845172155ea3288d2c528c Mon Sep 17 00:00:00 2001 From: vithobaa Date: Tue, 30 Jun 2026 10:03:41 +0530 Subject: [PATCH] chore: change default database name to autopilot_db and user to autopilot --- .env.example | 5 +++-- docker-compose.yml | 4 ++-- master/src/main/resources/application-local.yml | 6 +++--- master/src/main/resources/application.yml | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index ee4ad15..47ebbee 100644 --- a/.env.example +++ b/.env.example @@ -2,8 +2,9 @@ # Copy this file to .env and fill in the real values before deploying # ─── Database (PostgreSQL) ─────────────────────────────────────────────────── -DB_URL=jdbc:postgresql://postgres:5432/localagent_cloud -DB_USER=localagent +DB_NAME=autopilot_db +DB_URL=jdbc:postgresql://postgres:5432/${DB_NAME} +DB_USER=autopilot DB_PASS=changeme_strong_password_here # ─── Security ──────────────────────────────────────────────────────────────── diff --git a/docker-compose.yml b/docker-compose.yml index 5e512fc..592718c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,14 +7,14 @@ services: image: postgres:15-alpine container_name: autopilot-postgres environment: - POSTGRES_DB: localagent_cloud + POSTGRES_DB: ${DB_NAME:-autopilot_db} POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASS} volumes: - postgres_data:/var/lib/postgresql/data restart: unless-stopped healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d localagent_cloud"] + test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME:-autopilot_db}"] interval: 10s timeout: 5s retries: 5 diff --git a/master/src/main/resources/application-local.yml b/master/src/main/resources/application-local.yml index d538f53..3aa0478 100644 --- a/master/src/main/resources/application-local.yml +++ b/master/src/main/resources/application-local.yml @@ -1,9 +1,9 @@ # This file is active when running on the 'dev' branch with the 'local' profile. spring: datasource: - url: jdbc:postgresql://localhost:5432/localagent_cloud - username: localagent - password: localagent + url: jdbc:postgresql://localhost:5432/autopilot_db + username: autopilot + password: autopilot jpa: hibernate: ddl-auto: update # Useful for local dev to auto-update schema diff --git a/master/src/main/resources/application.yml b/master/src/main/resources/application.yml index 6e3c937..cdc3857 100644 --- a/master/src/main/resources/application.yml +++ b/master/src/main/resources/application.yml @@ -11,9 +11,9 @@ spring: name: autopilot-master datasource: # Production default: PostgreSQL (set DB_URL/DB_USER/DB_PASS on AWS for RDS) - url: ${DB_URL:jdbc:postgresql://localhost:5432/localagent_cloud} - username: ${DB_USER:localagent} - password: ${DB_PASS:localagent} + url: ${DB_URL:jdbc:postgresql://localhost:5432/autopilot_db} + username: ${DB_USER:autopilot} + password: ${DB_PASS:autopilot} driver-class-name: org.postgresql.Driver hikari: minimum-idle: 1