From 157601b10d0ae0b8cb1380a321f32e961f25bada Mon Sep 17 00:00:00 2001 From: liberty-rising Date: Sun, 21 Jan 2024 16:41:27 +0100 Subject: [PATCH] edit setup dev environment with new model attributes --- .../dev/initialization/setup_dev_environment.py | 2 +- docker-compose.yml | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/backend/envs/dev/initialization/setup_dev_environment.py b/backend/envs/dev/initialization/setup_dev_environment.py index 74c8d03..61c0246 100644 --- a/backend/envs/dev/initialization/setup_dev_environment.py +++ b/backend/envs/dev/initialization/setup_dev_environment.py @@ -173,7 +173,7 @@ def create_sample_dataprofile(): name="Sample Profile", file_type="pdf", organization_id=1, - description="Sample Description", + extract_instructions="Sample extract instructions", ) # Using DatabaseManager to manage the database session with DatabaseManager() as session: diff --git a/docker-compose.yml b/docker-compose.yml index fe9f0c2..b1aa10a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,9 +10,6 @@ services: condition: service_healthy env_file: - ./backend/.env - environment: - POSTGRES_USER: admin - POSTGRES_PASSWORD: admin ports: - "8000:8000" volumes: @@ -34,10 +31,17 @@ services: environment: POSTGRES_USER: admin POSTGRES_PASSWORD: admin + POSTGRES_DB: db + ports: + - "5432:5432" + volumes: + - pgdata:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U admin"] + test: ["CMD-SHELL", "pg_isready -U admin -d db"] interval: 30s timeout: 30s retries: 3 - volumes: - - ./initdb:/docker-entrypoint-initdb.d # Added line for initialization script + +volumes: + pgdata: +