fix initdb

This commit is contained in:
deflax 2024-04-01 19:05:39 +03:00
parent 4e7d8bc743
commit b4ab4a392a
2 changed files with 6 additions and 5 deletions

View file

@ -10,11 +10,11 @@ DATABASE_URL=postgresql://forest:forest123@db:5432/forest_prod
POSTGRES_USER=forest POSTGRES_USER=forest
POSTGRES_PASSWORD=forest123 POSTGRES_PASSWORD=forest123
POSTGRES_DB=forest_prod POSTGRES_DB=forest_prod
PGADMIN_DEFAULT_EMAIL=daniel@deflax.net
PGADMIN_DEFAULT_PASSWORD=
PGADMIN_CONFIG_SERVER_MODE=False
MAIL_ADMIN=daniel@deflax.net PGADMIN_DEFAULT_EMAIL=mail@example.com
PGADMIN_DEFAULT_PASSWORD=hackme
MAIL_ADMIN=mail@example.com
MAIL_SUBJECT_PREFIX=ForestNet MAIL_SUBJECT_PREFIX=ForestNet
MAIL_SERVER=smtp.gmail.com MAIL_SERVER=smtp.gmail.com
MAIL_USERNAME=admin@gmail.com MAIL_USERNAME=admin@gmail.com

View file

@ -20,7 +20,7 @@ from flask_mail import Mail
from flask_wtf.csrf import CSRFProtect, CSRFError from flask_wtf.csrf import CSRFProtect, CSRFError
from flask_moment import Moment from flask_moment import Moment
from models import lm from models import db, lm
sys.stderr.write("worker uid={} gid={}".format(os.getuid(), os.getgid())) sys.stderr.write("worker uid={} gid={}".format(os.getuid(), os.getgid()))
sys.stderr.flush() sys.stderr.flush()
@ -28,6 +28,7 @@ sys.stderr.flush()
app = Flask(__name__) app = Flask(__name__)
app.config.from_object("config.Config") app.config.from_object("config.Config")
db.init_app(app)
lm.init_app(app) lm.init_app(app)
mail = Mail() mail = Mail()