Add config.overrides.py for development config
This commit is contained in:
parent
71a04b1611
commit
01bde30d0c
2
api/.gitignore
vendored
2
api/.gitignore
vendored
|
@ -43,3 +43,5 @@ local/
|
||||||
# both, because then developers will only update one of them and they'll
|
# both, because then developers will only update one of them and they'll
|
||||||
# contradict. For now, npm shall be the canonical default (compare README.md).
|
# contradict. For now, npm shall be the canonical default (compare README.md).
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
|
||||||
|
config.overrides.py
|
||||||
|
|
|
@ -31,6 +31,10 @@ app = Sanic("OpenBikeSensor Portal API", load_env="OBS_", log_config={})
|
||||||
if isfile("./config.py"):
|
if isfile("./config.py"):
|
||||||
app.update_config("./config.py")
|
app.update_config("./config.py")
|
||||||
|
|
||||||
|
# For developers to override the config without committing it
|
||||||
|
if isfile("./config.overrides.py"):
|
||||||
|
app.update_config("./config.overrides.py")
|
||||||
|
|
||||||
c = app.config
|
c = app.config
|
||||||
|
|
||||||
api = Blueprint("api", url_prefix="/api")
|
api = Blueprint("api", url_prefix="/api")
|
||||||
|
|
|
@ -28,6 +28,7 @@ services:
|
||||||
- ./api/scripts/obs:/opt/obs/scripts/obs
|
- ./api/scripts/obs:/opt/obs/scripts/obs
|
||||||
- ./api/tools:/opt/obs/api/tools
|
- ./api/tools:/opt/obs/api/tools
|
||||||
- ./api/config.dev.py:/opt/obs/api/config.py
|
- ./api/config.dev.py:/opt/obs/api/config.py
|
||||||
|
- ./api/config.overrides.py:/opt/obs/api/config.overrides.py
|
||||||
- ./frontend/build:/opt/obs/frontend/build
|
- ./frontend/build:/opt/obs/frontend/build
|
||||||
- ./tile-generator:/opt/obs/tile-generator
|
- ./tile-generator:/opt/obs/tile-generator
|
||||||
- ./local/api-data:/data
|
- ./local/api-data:/data
|
||||||
|
@ -51,6 +52,7 @@ services:
|
||||||
- ./api/scripts/obs:/opt/obs/scripts/obs
|
- ./api/scripts/obs:/opt/obs/scripts/obs
|
||||||
- ./api/tools:/opt/obs/api/tools
|
- ./api/tools:/opt/obs/api/tools
|
||||||
- ./api/config.dev.py:/opt/obs/api/config.py
|
- ./api/config.dev.py:/opt/obs/api/config.py
|
||||||
|
- ./api/config.overrides.py:/opt/obs/api/config.overrides.py
|
||||||
- ./local/api-data:/data
|
- ./local/api-data:/data
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
|
Loading…
Reference in a new issue