mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-27 17:03:44 +03:00
Compare commits
2 Commits
30616ba17d
...
773fd2830e
Author | SHA1 | Date | |
---|---|---|---|
773fd2830e | |||
1644fa5403 |
|
@ -4,8 +4,14 @@
|
|||
from django.conf import settings
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
from akarpov.common.channels import HeaderAuthMiddleware
|
||||
from config import routing
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
|
||||
# Initialize Django ASGI application early to ensure the AppRegistry
|
||||
# is populated before importing code that may import ORM models.
|
||||
django_asgi_app = get_asgi_application()
|
||||
|
||||
|
||||
from akarpov.common.channels import HeaderAuthMiddleware # noqa
|
||||
from config import routing # noqa
|
||||
|
||||
if settings.DEBUG:
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
|
||||
|
@ -14,7 +20,7 @@
|
|||
|
||||
application = ProtocolTypeRouter(
|
||||
{
|
||||
"http": get_asgi_application(),
|
||||
"http": django_asgi_app,
|
||||
"websocket": HeaderAuthMiddleware(URLRouter(routing.websocket_urlpatterns)),
|
||||
}
|
||||
)
|
||||
|
|
|
@ -19,6 +19,7 @@ services:
|
|||
- mailhog
|
||||
- elasticsearch
|
||||
volumes:
|
||||
- /var/www/media:/app/akarpov/media
|
||||
- .:/app:z
|
||||
env_file:
|
||||
- ./.envs/.local/.django
|
||||
|
@ -44,7 +45,7 @@ services:
|
|||
- ./.envs/.local/.django
|
||||
- ./.envs/.local/.postgres
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "3025:3000"
|
||||
command: /start-redirect
|
||||
|
||||
postgres:
|
||||
|
|
Loading…
Reference in New Issue
Block a user