Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database should be created and populated automatically, or at least documented #51

Open
StreakyCobra opened this issue Nov 24, 2017 · 4 comments

Comments

@StreakyCobra
Copy link
Owner

On new installations, the database does not exist and raposfly fails because of this.

Raposfly should either automatically:

  • Initialize the database
  • Create a default admin account

or at least document it in the installation procedure.

@philippetheis
Copy link

Hello, I have the same problem after the installation and docker build. there is an error message shown "Impossible to connect to database"
Could you please tell me how I can manually initialize the db and create a default admin account?

bildschirmfoto 2018-06-06 um 15 51 44

Thanks a lot and best regards

@StreakyCobra
Copy link
Owner Author

Hi @philippetheis,

I'm writing this from memory because I don't have my development Raspberry Pi at the moment, but this will hopefully already help you:

  1. Open an interactive bash session to the backend container (container name may vary):

    docker exec -it raposfly_backend_1 bash
    
  2. This should put you in "/usr/lib/raposfly" by default, where you can the initialize the database:

    python manage.py migrate
    
  3. And then create the super user:

    python manage.py createsuperuser
    

It may be required to restart raposfly after this to take effect, I'm not sure.

@philippetheis
Copy link

Perfect it works! Thanks a lot for your super fast help! have a nice day and regards from Zurich.

@StreakyCobra
Copy link
Owner Author

Glade to hear :) My pleasure! 🇨🇭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants