diff --git a/README b/README index 1c0fcf9..623e3f0 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ In here we can put instructions on how to run this / any general info ubuntu packages: - sudo apt-get install -y mediainfo cmake + sudo apt-get install -y mediainfo cmake python3-flask pip packages: * pymediainfo diff --git a/TODO b/TODO index c7c6544..c0aa6e2 100644 --- a/TODO +++ b/TODO @@ -42,6 +42,7 @@ clear all jobs (via GUI) clear old jobs? (via b/end?) clear FE messages (at least dup ones on File data deletion) -- in backend + need to copy into here the jquery/fa files so we don't need internet to function sorter... need some way to multiselect images [DONE] diff --git a/main.py b/main.py index a7d2d6d..d6f010f 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ from flask_bootstrap import Bootstrap from wtforms import SubmitField, StringField, HiddenField, SelectField, IntegerField, TextAreaField, validators from flask_wtf import FlaskForm from status import st, Status -from shared import CreateSelect +from shared import CreateSelect, DB_URL import re import socket @@ -17,9 +17,6 @@ print( "Running on: {}".format( hostname) ) app = Flask(__name__) ### what is this value? I gather I should change it? -# connection string: pguseraccount, pgpasswd, mara as the host, db port is 55432, dbname -DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa' - app.config['SQLALCHEMY_DATABASE_URI'] = DB_URL app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config.from_mapping( SECRET_KEY=b'\xd6\x04\xbdj\xfe\xed$c\x1e@\xad\x0f\x13,@G') diff --git a/shared.py b/shared.py index aefe742..a20c477 100644 --- a/shared.py +++ b/shared.py @@ -1,13 +1,18 @@ import socket -DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa' hostname = socket.gethostname() PROD_HOST="pa_web" if hostname == PROD_HOST: PA_JOB_MANAGER_HOST="192.168.0.2" + DB_URL = 'postgresql+psycopg2://pa:for_now_pa@192.168.0.2:55432/pa' +elif hostname == "lappy": + PA_JOB_MANAGER_HOST="localhost" + DB_URL = 'postgresql+psycopg2://pa:for_now_pa@localhost:5432/pa' else: PA_JOB_MANAGER_HOST="localhost" + DB_URL = 'postgresql+psycopg2://pa:for_now_pa@mara.ddp.net:55432/pa' + PA_JOB_MANAGER_PORT=55430 THUMBSIZE=256