Closed lkangas closed 4 years ago
Just updated the instruction, see 1ec015c. You should work with an virtual environment (see the new step no 2).
Thanks. I'll try that out soon. Before, I managed to get flask to recognize the database init command after setting the FLASK_APP env variable, but run into another error. Be back soon.
Ok, no difference with using the virtualenv.
After setting 'export FLASK_APP=ogn_python.py' manually (I also tried setting 'export OGN_CONFIG_MODULE=config/default.py'), 'flask database init' gives me this:
https://gist.github.com/lkangas/042e7571b6a3f27332c4b9c9ce907f61
no password supplied. Where should I supply this?
At https://github.com/glidernet/ogn-python/blob/d1966cf373f8320886447cb4bd2606ccde84d17a/app/__init__.py#L24 I see I don't need to set OGN_CONFIG_MODULE myself, unless I want to make changes. So nevermind that part.
If you protected your db with a password then you have to provide this password in the connection string. E.g.
export SQLALCHEMY_DATABASE_URI="postgresql://postgres:mypassword@localhost:5432/ogn"
You could also put this configuration in your custom OGN_CONFIG_MODULE, but this is optional.
Thank you! I managed to change that in the default.py config file for now. With this and a few other things I figured out, I think I have the system deployed. I'll go through my notes a few more times and then start playing with actually running the app. I'll open other issues if I run into any.
I'm trying to get ogn-python running. Point 3 in the installation instructions seemed to involve running docker-compose as per the files in the deployment directory. I also figured out how to create a new server and database in the pgadmin web ui.
But how do I advance from the next steps, running flask? Why is the command './flask'? Am i missing a flask script from the repository? My normal flask command does not support the option 'database'.