add docker-compose file and configure PostgreSQL service; update database credentials in app.py
This commit is contained in:
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@@ -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:
|
||||||
@@ -2,7 +2,7 @@ from flask import Flask
|
|||||||
from db.database import Database
|
from db.database import Database
|
||||||
|
|
||||||
app = Flask(__name__)
|
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('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
|
|||||||
Reference in New Issue
Block a user