Skip to content

Commit

Permalink
removing all references to FLASK_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Jun 16, 2023
1 parent 58beff4 commit 0844faf
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/superset-applitool-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
browser: ["chrome"]
node: [16]
env:
FLASK_ENV: development
SUPERSET_ENV: development
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
PYTHONPATH: ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/superset-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
containers: [1, 2, 3]
browser: ["chrome"]
env:
FLASK_ENV: development
SUPERSET_ENV: development
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
PYTHONPATH: ${{ github.workspace }}
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ superset load-examples
# Start the Flask dev web server from inside your virtualenv.
# Note that your page may not have CSS at this point.
# See instructions below how to build the front-end assets.
FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger
superset run -p 8088 --with-threads --reload --debugger --debug
```

Or you can install via our Makefile
Expand All @@ -477,7 +477,7 @@ $ make pre-commit
via `.flaskenv`, however if needed, it should be set to `superset.app:create_app()`**

If you have made changes to the FAB-managed templates, which are not built the same way as the newer, React-powered front-end assets, you need to start the app without the `--with-threads` argument like so:
`FLASK_ENV=development superset run -p 8088 --reload --debugger`
`superset run -p 8088 --reload --debugger --debug`

#### Dependencies

Expand Down Expand Up @@ -518,7 +518,7 @@ def FLASK_APP_MUTATOR(app):
Then make sure you run your WSGI server using the right worker type:

```bash
FLASK_ENV=development gunicorn "superset.app:create_app()" -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -b 127.0.0.1:8088 --reload
gunicorn "superset.app:create_app()" -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -b 127.0.0.1:8088 --reload
```

You can log anything to the browser console, including objects:
Expand Down Expand Up @@ -603,7 +603,7 @@ So a typical development workflow is the following:
1. [run Superset locally](#flask-server) using Flask, on port `8088` — but don't access it directly,<br/>
```bash
# Install Superset and dependencies, plus load your virtual environment first, as detailed above.
FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger
superset run -p 8088 --with-threads --reload --debugger --debug
```
2. in parallel, run the Webpack dev server locally on port `9000`,<br/>
```bash
Expand Down Expand Up @@ -922,7 +922,7 @@ For debugging locally using VSCode, you can configure a launch configuration fil
"module": "flask",
"env": {
"FLASK_APP": "superset",
"FLASK_ENV": "development"
"SUPERSET_ENV": "development"
},
"args": [
"run",
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FROM python:${PY_VER} AS lean

ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
FLASK_ENV=production \
SUPERSET_ENV=production \
FLASK_APP="superset.app:create_app()" \
PYTHONPATH="/app/pythonpath" \
SUPERSET_HOME="/app/superset_home" \
Expand Down
2 changes: 1 addition & 1 deletion RELEASING/from_tarball_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ superset init
# Loading examples
superset load-examples --force

FLASK_ENV=development FLASK_APP="superset.app:create_app()" \
SUPERSET_ENV=development FLASK_APP="superset.app:create_app()" \
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
2 changes: 1 addition & 1 deletion docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PYTHONPATH=/app/pythonpath:/app/docker/pythonpath_dev
REDIS_HOST=redis
REDIS_PORT=6379

FLASK_ENV=development
SUPERSET_ENV=development
SUPERSET_ENV=development
SUPERSET_LOAD_EXAMPLES=yes
CYPRESS_CONFIG=false
Expand Down
2 changes: 1 addition & 1 deletion docker/.env-non-dev
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PYTHONPATH=/app/pythonpath:/app/docker/pythonpath_dev
REDIS_HOST=redis
REDIS_PORT=6379

FLASK_ENV=production
SUPERSET_ENV=production
SUPERSET_ENV=production
SUPERSET_LOAD_EXAMPLES=yes
SUPERSET_SECRET_KEY=TEST_NON_DEV_SECRET
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/contributing/local-backend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ superset load-examples

# Start the Flask dev web server from inside your virtualenv.
# Note that your page may not have CSS at this point.
FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger
superset run -p 8088 --with-threads --reload --debugger --debug
```

Or you can install via our Makefile
Expand All @@ -66,7 +66,7 @@ make pre-commit
via `.flaskenv`, however if needed, it should be set to `superset.app:create_app()`**

If you have made changes to the FAB-managed templates, which are not built the same way as the newer, React-powered front-end assets, you need to start the app without the `--with-threads` argument like so:
`FLASK_ENV=development superset run -p 8088 --reload --debugger`
`superset run -p 8088 --reload --debugger --debug`

#### Dependencies

Expand All @@ -93,7 +93,7 @@ def FLASK_APP_MUTATOR(app):
Then make sure you run your WSGI server using the right worker type:

```bash
FLASK_ENV=development gunicorn "superset.app:create_app()" -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -b 127.0.0.1:8088 --reload
SUPERSET_ENV=development gunicorn "superset.app:create_app()" -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -b 127.0.0.1:8088 --reload
```

You can log anything to the browser console, including objects:
Expand Down

0 comments on commit 0844faf

Please sign in to comment.