From 1907760f1a456e5d5c1cff8d3705f9682cf128be Mon Sep 17 00:00:00 2001 From: Dylan De Faoite Date: Sun, 11 Jan 2026 13:38:52 +0000 Subject: [PATCH] add docker-compose file and configure PostgreSQL service; update database credentials in app.py --- docker-compose.yml | 16 ++++++++++++++++ server/app.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5473917 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +services: + postgres: + image: postgres:16 + container_name: ethnograph-postgres + restart: unless-stopped + environment: + POSTGRES_DB: ethnograph + POSTGRES_USER: ethnograph_user + POSTGRES_PASSWORD: ethnograph_pass + ports: + - "5432:5432" + volumes: + - pgdata:/var/lib/postgresql/data + +volumes: + pgdata: diff --git a/server/app.py b/server/app.py index 251e95c..2c6a444 100644 --- a/server/app.py +++ b/server/app.py @@ -2,7 +2,7 @@ from flask import Flask from db.database import Database app = Flask(__name__) -db = Database(db_name='ethnograph', user='user', password='password') +db = Database(db_name='ethnograph', user='ethnograph_user', password='ethnograph_pass') @app.route('/') def index():