Skip to content

Commit

Permalink
Move FLASK_APP variable up to before superset db upgrade
Browse files Browse the repository at this point in the history
Had accidentally removed it in a prior commit instead of moving it
  • Loading branch information
sfirke authored Apr 26, 2024
1 parent c56cb69 commit 423df6e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/docs/installation/pypi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,19 @@ Do not lose this key. Consider maintaining a secure backup of your `superset_con

You could also tell Superset where to store its metadata - that is, what charts, dashboards, etc. have been created. By default, this is a SQLite database at the filepath `~/.superset/superset.db`.

For a production instance, you would change this to point to say, a PostgreSQL database that gets backed up. You change this by specifying a new value in `superset_config.py` for the variable `SQLALCHEMY_DATABASE_URI`.
In a production setup, you would change this to point to say, a PostgreSQL database that gets backed up. You change this by specifying a new value in `superset_config.py` for the variable `SQLALCHEMY_DATABASE_URI`.

Now initialize the database:
Set an environment variable so that `superset` commands will work in the terminal. As above, this is temporary, and can be set to persist by adding it to your `~/.profile`.
```
export FLASK_APP=superset
```

Now initialize the database:
```
superset db upgrade
```

Finish installing by running through the following commands:

```
# Create an admin user in your metadata database (use `admin` as username to be able to load the examples)
superset fab create-admin
Expand Down

0 comments on commit 423df6e

Please sign in to comment.