mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: rename WEBSOCKET_ENABLED in REALTIME_ENABLED
Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
parent
3670c47af9
commit
c0c55075b7
7 changed files with 21 additions and 24 deletions
|
@ -35,7 +35,7 @@ services:
|
||||||
- SITE_URL=https://umap.local/
|
- SITE_URL=https://umap.local/
|
||||||
- UMAP_ALLOW_ANONYMOUS=True
|
- UMAP_ALLOW_ANONYMOUS=True
|
||||||
- DEBUG=1
|
- DEBUG=1
|
||||||
- WEBSOCKET_ENABLED=1
|
- REALTIME_ENABLED=1
|
||||||
- REDIS_URL=redis://redis:6379
|
- REDIS_URL=redis://redis:6379
|
||||||
volumes:
|
volumes:
|
||||||
- data:/srv/umap/uploads
|
- data:/srv/umap/uploads
|
||||||
|
|
|
@ -88,6 +88,13 @@ Nginx configuration.
|
||||||
|
|
||||||
See [Django documentation for MEDIA_ROOT](https://docs.djangoproject.com/en/4.2/ref/settings/#media-root)
|
See [Django documentation for MEDIA_ROOT](https://docs.djangoproject.com/en/4.2/ref/settings/#media-root)
|
||||||
|
|
||||||
|
#### REALTIME_ENABLED
|
||||||
|
|
||||||
|
Setting `REALTIME_ENABLED` to `True` will allow users to enable real-time collaboration.
|
||||||
|
A switch will be available for them in the "advanced properties" of the map.
|
||||||
|
|
||||||
|
See [the documentation about ASGI deployment](../deploy/asgi.md) for more information.
|
||||||
|
|
||||||
#### SECRET_KEY
|
#### SECRET_KEY
|
||||||
|
|
||||||
Must be defined to something unique and secret.
|
Must be defined to something unique and secret.
|
||||||
|
@ -121,6 +128,13 @@ The final URL of you instance, including the protocol:
|
||||||
`SITE_URL=http://umap.org`
|
`SITE_URL=http://umap.org`
|
||||||
|
|
||||||
|
|
||||||
|
#### SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_KEY, SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_SECRET
|
||||||
|
|
||||||
|
If you use OpenStreetMap as OAuth 2 provider, you can use those settings.
|
||||||
|
|
||||||
|
Otherwise, use any valid [python-social-auth configuration](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html).
|
||||||
|
|
||||||
|
|
||||||
#### STATIC_ROOT
|
#### STATIC_ROOT
|
||||||
|
|
||||||
Where uMap should store static files (CSS, JS…), must be consistent with your
|
Where uMap should store static files (CSS, JS…), must be consistent with your
|
||||||
|
@ -348,16 +362,3 @@ Should uMap gzip datalayers geojson.
|
||||||
Can be set to `X-Accel-Redirect` to enable the [NGINX X-Accel](https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/) feature.
|
Can be set to `X-Accel-Redirect` to enable the [NGINX X-Accel](https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/) feature.
|
||||||
|
|
||||||
See the NGINX documentation in addition.
|
See the NGINX documentation in addition.
|
||||||
|
|
||||||
#### SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_KEY, SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_SECRET
|
|
||||||
|
|
||||||
If you use OpenStreetMap as OAuth 2 provider, you can use those settings.
|
|
||||||
|
|
||||||
Otherwise, use any valid [python-social-auth configuration](https://python-social-auth.readthedocs.io/en/latest/configuration/django.html).
|
|
||||||
|
|
||||||
#### WEBSOCKET_ENABLED
|
|
||||||
|
|
||||||
Setting `WEBSOCKET_ENABLED` to `True` will allow users to enable real-time collaboration.
|
|
||||||
A switch will be available for them in the "advanced properties" of the map.
|
|
||||||
|
|
||||||
See [the documentation about ASGI deployment](../deploy/asgi.md) for more information.
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ services
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
…
|
…
|
||||||
environment:
|
environment:
|
||||||
- WEBSOCKET_ENABLED=1
|
- REALTIME_ENABLED=1
|
||||||
- REDIS_URL=redis://redis:6379
|
- REDIS_URL=redis://redis:6379
|
||||||
…
|
…
|
||||||
|
|
||||||
|
|
|
@ -360,10 +360,8 @@ LOGGING = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# WebSocket configuration
|
# Real-time editing configuration
|
||||||
|
|
||||||
WEBSOCKET_ENABLED = env.bool("WEBSOCKET_ENABLED", default=False)
|
REALTIME_ENABLED = env.bool("REALTIME_ENABLED", default=False)
|
||||||
WEBSOCKET_BACK_HOST = env("WEBSOCKET_BACK_HOST", default="localhost")
|
|
||||||
WEBSOCKET_BACK_PORT = env.int("WEBSOCKET_BACK_PORT", default=8001)
|
|
||||||
|
|
||||||
REDIS_URL = env("REDIS_URL", default="redis://localhost:6379")
|
REDIS_URL = env("REDIS_URL", default="redis://localhost:6379")
|
||||||
|
|
|
@ -26,8 +26,6 @@ PASSWORD_HASHERS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
WEBSOCKET_ENABLED = True
|
REALTIME_ENABLED = True
|
||||||
WEBSOCKET_BACK_PORT = "8010"
|
|
||||||
WEBSOCKET_FRONT_URI = "ws://localhost:8010"
|
|
||||||
|
|
||||||
REDIS_URL = "redis://localhost:6379/15"
|
REDIS_URL = "redis://localhost:6379/15"
|
||||||
|
|
|
@ -28,7 +28,7 @@ def _urls_for_js():
|
||||||
"""
|
"""
|
||||||
urls = {}
|
urls = {}
|
||||||
modules = ["umap.urls"]
|
modules = ["umap.urls"]
|
||||||
if settings.WEBSOCKET_ENABLED:
|
if settings.REALTIME_ENABLED:
|
||||||
modules.append("umap.sync.app")
|
modules.append("umap.sync.app")
|
||||||
for module in modules:
|
for module in modules:
|
||||||
names = _get_url_names(module)
|
names = _get_url_names(module)
|
||||||
|
|
|
@ -616,7 +616,7 @@ class MapDetailMixin(SessionMixin):
|
||||||
"licences": dict((l.name, l.json) for l in Licence.objects.all()),
|
"licences": dict((l.name, l.json) for l in Licence.objects.all()),
|
||||||
"umap_version": VERSION,
|
"umap_version": VERSION,
|
||||||
"featuresHaveOwner": settings.UMAP_DEFAULT_FEATURES_HAVE_OWNERS,
|
"featuresHaveOwner": settings.UMAP_DEFAULT_FEATURES_HAVE_OWNERS,
|
||||||
"websocketEnabled": settings.WEBSOCKET_ENABLED,
|
"websocketEnabled": settings.REALTIME_ENABLED,
|
||||||
"importers": settings.UMAP_IMPORTERS,
|
"importers": settings.UMAP_IMPORTERS,
|
||||||
"defaultLabelKeys": settings.UMAP_LABEL_KEYS,
|
"defaultLabelKeys": settings.UMAP_LABEL_KEYS,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue