Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnnsrs committed Jan 7, 2024
2 parents 5b08443 + a263fce commit a19cffa
Show file tree
Hide file tree
Showing 345 changed files with 11,293 additions and 6,550 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
"extensions": [
"ms-python.python",
"njpwerner.autodocstring",
"ms-python.vscode-pylance",
"actboy168.tasks",
"usernamehw.errorlens",
"usernamehw.errorlens"
]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down
2 changes: 0 additions & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
# build:
# context: .
# dockerfile: .devcontainer/Dockerfile
ports:
- 8090:8090
volumes:
# Update this to wherever you want VS Code to mount the folder of your project
- .:/workspace:cached
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docker-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ name: Docker Main
on:
push:
branches: [master]
pull_request:
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@
},
"djangointellisense.projectRoot": "/workspace",
"djangointellisense.settingsModule": "arkitekt.settings",
"python.linting.enabled": false
"python.linting.enabled": false,
"python.testing.pytestArgs": [
"."
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"label": "Build",
"type": "shell",
"command": "docker build -t jhnnsrs/arkitekt:prod ."
"command": "docker build -t jhnnsrs/rekuest:prod ."
},
{
"label": "Reserver",
Expand Down
19 changes: 15 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,27 @@ FROM python:3.8
LABEL maintainer="jhnnsrs@gmail.com"


# Install Minimal Dependencies for Django
ADD requirements.txt /tmp
WORKDIR /tmp
RUN pip install -r requirements.txt
# Install dependencies
RUN pip install poetry rich

# Configure poetry
RUN poetry config virtualenvs.create false
ENV PYTHONUNBUFFERED=1


# Copy dependencies
COPY pyproject.toml /
COPY poetry.lock /
RUN poetry install



# Install Arbeid
RUN mkdir /workspace
ADD . /workspace
WORKDIR /workspace


CMD bash run.sh


1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# rekuest server
24 changes: 8 additions & 16 deletions arkitekt/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,19 @@

import os
import django

from facade.consumers.watchman import WatchmanConsumer
from django.urls import re_path


os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkitekt.settings")
django.setup(set_prefix=False)

from django.core.asgi import get_asgi_application
from facade.consumers.agent import AgentConsumer
from facade.consumers.postman import PostmanConsumer
from facade.workers.gateway import GatewayConsumer
from channels.auth import AuthMiddlewareStack
from channels.routing import ChannelNameRouter, ProtocolTypeRouter, URLRouter
from channels.routing import ProtocolTypeRouter, URLRouter
from django.conf.urls import url
from django.core.asgi import get_asgi_application
from balder.consumers import MyGraphqlWsConsumer
from lok.middlewares.scope.bouncer import BouncerChannelMiddleware
from lok.middlewares.scope.jwt import JWTChannelMiddleware
from django.views.static import serve

from hare.consumers.postman.hare.postman import HarePostmanConsumer
from hare.consumers.agent.hare.agent import HareAgentConsumer
Expand All @@ -51,16 +45,14 @@ def MiddleWareStack(inner):
"websocket": MiddleWareStack(
URLRouter(
[
url("graphql/", MyGraphqlWsConsumer.as_asgi()),
url("graphql", MyGraphqlWsConsumer.as_asgi()),
url(r"agent\/$", AgentConsumer.as_asgi()),
url(r"postman\/$", PostmanConsumer.as_asgi()),
url(r"watchman\/$", WatchmanConsumer.as_asgi()),
url(r"watchi\/$", HarePostmanConsumer.as_asgi()),
url(r"agi\/$", HareAgentConsumer.as_asgi()),
re_path("graphql/", MyGraphqlWsConsumer.as_asgi()),
re_path("graphql", MyGraphqlWsConsumer.as_asgi()),
re_path(r"watchi\/$", HarePostmanConsumer.as_asgi()),
re_path(r"watchi$", HarePostmanConsumer.as_asgi()),
re_path(r"agi\/$", HareAgentConsumer.as_asgi()),
re_path(r"agi$", HareAgentConsumer.as_asgi()),
]
)
),
"channel": ChannelNameRouter({"gateway": GatewayConsumer.as_asgi()}),
}
)
Loading

0 comments on commit a19cffa

Please sign in to comment.