Skip to content

Commit

Permalink
feat: add docker compose to test soteria with emqx
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Oct 21, 2023
1 parent 3613afa commit f73cf0e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
soteria:
build:
dockerfile: ./build/package/Dockerfile
context: .
command: serve
emqx:
image: emqx/emqx
environment:
EMQX_DASHBOARD__DEFAULT_PASSWORD: public
EMQX_DASHBOARD__DEFAULT_USERNAME: admin
EMQX_AUTHENTICATION__1__MECHANISM: "password_based"
EMQX_AUTHENTICATION__1__BACKEND: "http"
EMQX_AUTHENTICATION__1__ENABLE: "true"
EMQX_AUTHENTICATION__1__METHOD: "post"
EMQX_AUTHENTICATION__1__URL: "http://soteria:9999/v2/auth"
EMQX_AUTHENTICATION__1__BODY: '{"username" = "$${username}", "password" = "$${password}", "token" = "$${username}"}'
EMQX_AUTHORIZATION__NO_MATCH: deny
EMQX_AUTHORIZATION__DENY_ACTION: disconnect
EMQX_AUTHORIZATION__SOURCES__1__TYPE: http
EMQX_AUTHORIZATION__SOURCES__1__METHOD: post
EMQX_AUTHORIZATION__SOURCES__1__URL: "http://soteria:9999/v2/acl"
EMQX_AUTHORIZATION__SOURCES__1__BODY: '{"username" = "$${username}", "password" = "$${password}", "token" = "$${username}"}'
EMQX_LISTENERS__TCP__DEFAULT__ENABLE_AUTHN: "quick_deny_anonymous"
EMQX_LISTENERS__TCP__INTERNAL__ENABLE: "true"
EMQX_LISTENERS__TCP__INTERNAL__BIND: 11883
EMQX_LISTENERS__TCP__INTERNAL__ENABLE_AUTHN: "false"
ports:
- 1883:1883
- 18083:18083
2 changes: 1 addition & 1 deletion internal/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func Default() Config {
SnappVendor(),
},
Logger: logger.Config{
Level: "warn",
Level: "debug",
},
HTTPPort: DefaultHTTPPort,
Tracer: tracing.Config{
Expand Down

0 comments on commit f73cf0e

Please sign in to comment.