Skip to content

Commit

Permalink
Merge branch 'main' into loadbalancing
Browse files Browse the repository at this point in the history
  • Loading branch information
awlx authored Sep 18, 2023
2 parents a72a21f + 4a9436d commit 5c01fc5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.4-bullseye AS builder
FROM python:3.11.5-bullseye AS builder

RUN apt-get update && apt-get install -y apt-transport-https curl gnupg \
&& curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >/usr/share/keyrings/bazel-archive-keyring.gpg \
Expand All @@ -15,7 +15,7 @@ RUN ["bazel", "build", "//wgkex/broker:app"]
RUN ["bazel", "build", "//wgkex/worker:app"]
RUN ["cp", "-rL", "bazel-bin", "bazel"]

FROM python:3.11.3-bullseye
FROM python:3.11.5-bullseye
WORKDIR /wgkex

COPY --from=builder /wgkex/bazel /wgkex/
Expand Down
Binary file added Docs/architecture-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ wgkex is a WireGuard key exchange and management tool designed and run by FFMUC.
WireGuard Key Exchange is a tool consisting of two parts: a frontend (broker) and a backend (worker). These components
communicate to each other via MQTT - a messaging bus.

![](Docs/architecture.png)
<picture>
<source media="(prefers-color-scheme: dark)" srcset="Docs/architecture-dark.png">
<source media="(prefers-color-scheme: light)" srcset="Docs/architecture.png">
<img src="Docs/architecture.png" alt="Architectural Diagram">
</picture>

### Frontend broker

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ flask-mqtt
pyroute2
PyYAML
Flask
waitress

# Common
ipaddress
Expand Down
1 change: 1 addition & 0 deletions wgkex/broker/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ py_binary(
deps=[
requirement("flask"),
requirement("flask-mqtt"),
requirement("waitress"),
"//wgkex/config:config",
"//wgkex/common:mqtt",
":metrics"
Expand Down
3 changes: 2 additions & 1 deletion wgkex/broker/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from flask.app import Flask as Flask_app
from flask_mqtt import Mqtt

from waitress import serve
from wgkex.config import config
from wgkex.common import logger
from wgkex.common.utils import is_valid_domain
Expand Down Expand Up @@ -277,4 +278,4 @@ def join_host_port(host: str, port: str) -> str:
listen_host = listen_config.host
listen_port = listen_config.port

app.run(host=listen_host, port=listen_port)
serve(app, host=listen_host, port=listen_port)

0 comments on commit 5c01fc5

Please sign in to comment.