asymworks / jadetree-backend Goto Github PK
View Code? Open in Web Editor NEWJade Tree Budgeting Server Backend
License: BSD 3-Clause "New" or "Revised" License
Jade Tree Budgeting Server Backend
License: BSD 3-Clause "New" or "Revised" License
GET /api/v1/ledger fails when no accounts are set up and frontend dashboard shows error. Traceback:
File "/Users//Projects/JadeTree/backend/jadetree/api/v1/budget/base.py", line 135, in get
data = budget_service.get_budget_month(
File "/Users//Projects/JadeTree/backend/jadetree/service/budget/data.py", line 234, in get_budget_month
budget_data = get_budget_data(session, user, budget_id)
File "/Users//Projects/JadeTree/backend/jadetree/service/budget/data.py", line 184, in get_budget_data
parent_id=categories[cat].parent_id,
KeyError: 38
Need to rate-limit resending of confirmation emails to avoid spamming users (low likelihood but not difficult to implement)
confirmation_sent_at
field to User model and users tableconfirmation_sent_at
and raise exception if too recent (application configured but default to 10 minutes?)I tried DB init with MariaDB and sqllite and getting the same error:
ERROR in factory: Startup Error (ConfigError): Either FRONTEND_HOST or SERVER_NAME must be set to resolve frontend URLs.
Setting up FRONTEND_HOST and/or SERVER_NAME doesn't help.
1st try - using MariaDB installed on the server:
docker run --rm -ti
--env JADETREE_DB_DRIVER=mysql
--env JADETREE_DB_HOST=192.168.10.2
--env JADETREE_DB_PORT=3306
--env JADETREE_DB_NAME=jadetree
--env JADETREE_DB_USERNAME=jadetree_app
--env JADETREE_DB_PASSWORD='xxxxxxxxxxxxxxxxxxxx'
--env FRONTEND_HOST='https://jadetreeapi.xxxxxx.xxx'
asymworks/jadetree-backend:0.9-alpha
db init
2nd try - using sqllite
docker run --rm -ti
--env JADETREE_DB_DRIVER=sqlite
--env JADETREE_DB_FILE=jadetee.db
--env FRONTEND_HOST=https://jadetreeapi.xxxxxx.xxx
--env SERVER_NAME=jadetreeapi.xxxxxx.xxx
--volume /volume1/docker/jadetree:/jadetree
asymworks/jadetree-backend:0.9-alpha
db init
In both cases getting same stacktrace:
[2022-03-02 02:25:13,118] [None - None] DEBUG in mail: Skipping mail setup (disabled)
[2022-03-02 02:25:13,120] [None - None] DEBUG in cli: CLI Initialized
[2022-03-02 02:25:14,091] [None - None] DEBUG in init: API v1 Initialized
[2022-03-02 02:25:14,091] [None - None] DEBUG in init: API and CORS Initialized
[2022-03-02 02:25:14,092] [None - None] DEBUG in socketio: Web Sockets Initialized
[2022-03-02 02:25:14,094] [None - None] ERROR in factory: Startup Error (ConfigError): Either FRONTEND_HOST or SERVER_NAME must be set to resolve frontend URLs.
Traceback (most recent call last):
File "/home/jadetree/venv/bin/flask", line 8, in
sys.exit(main())
File "/home/jadetree/venv/lib/python3.8/site-packages/flask/cli.py", line 967, in main
cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
File "/home/jadetree/venv/lib/python3.8/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/home/jadetree/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/jadetree/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jadetree/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jadetree/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jadetree/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jadetree/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/jadetree/venv/lib/python3.8/site-packages/flask/cli.py", line 425, in decorator
with __ctx.ensure_object(ScriptInfo).load_app().app_context():
File "/home/jadetree/venv/lib/python3.8/site-packages/flask/cli.py", line 388, in load_app
app = locate_app(self, import_name, name)
File "/home/jadetree/venv/lib/python3.8/site-packages/flask/cli.py", line 257, in locate_app
return find_best_app(script_info, module)
File "/home/jadetree/venv/lib/python3.8/site-packages/flask/cli.py", line 83, in find_best_app
app = call_factory(script_info, app_factory)
File "/home/jadetree/venv/lib/python3.8/site-packages/flask/cli.py", line 119, in call_factory
return app_factory()
File "/home/jadetree/jadetree/factory.py", line 161, in create_app
raise e
File "/home/jadetree/jadetree/factory.py", line 146, in create_app
init_templates(app)
File "/home/jadetree/jadetree/templates/init.py", line 118, in init_templates
setup_frontend_urls(app)
File "/home/jadetree/jadetree/templates/init.py", line 53, in setup_frontend_urls
raise ConfigError(
jadetree.exc.ConfigError: Either FRONTEND_HOST or SERVER_NAME must be set to resolve frontend URLs.
I would really love to give it a try :)
After running the install process, the backend is failing to startup. Logs are attached.
I attempted a full reinstall (cloned repo again, docker-compose down). Same problem occurred.
Update build scripts to push armhf, armv7, and aarch64 images to Docker Hub for Raspberry PIs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.