mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 14:57:56 +01:00
Merge branch 'docker-example' into 'development'
added a dockerized version of the example See merge request fabinfra/fabaccess/bffh!5
This commit is contained in:
commit
7dd4914bf1
@ -1,13 +0,0 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
bffh:
|
||||
build: .
|
||||
ports:
|
||||
- "59661:59661"
|
||||
volumes:
|
||||
# generate a sample config.toml by running "docker run diflouroborane --print-default". You may have to delete the ipv6 listen section.
|
||||
- "$PWD/config.toml:/etc/diflouroborane.toml"
|
||||
links:
|
||||
- mqtt
|
||||
mqtt:
|
||||
image: eclipse-mosquitto
|
10
examples/docker/README.md
Normal file
10
examples/docker/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
# API-Testsetup, aber mit Docker
|
||||
|
||||
wirklich nur um das API zu testen. ATM implementiert: machine::read
|
||||
|
||||
* Use included config.toml, or
|
||||
* generate a sample config.toml by running "docker run registry.gitlab.com/fabinfra/fabaccess/bffh:dev-latest --print-default > config.toml". You may have to delete the ipv6 listen section.
|
||||
1. change mqtt-server hostname to `mqtt` in config.toml
|
||||
1. change machines path to `/etc/bffh/machines.toml`
|
||||
|
||||
* run `docker-compose up`
|
12
examples/docker/config.toml
Normal file
12
examples/docker/config.toml
Normal file
@ -0,0 +1,12 @@
|
||||
machines = "/etc/bffh/machines.toml"
|
||||
|
||||
[[listens]]
|
||||
address = "127.0.0.1"
|
||||
port = 59661
|
||||
|
||||
[[listens]]
|
||||
address = "::1"
|
||||
port = 59661
|
||||
|
||||
[shelly]
|
||||
mqtt_url = "mqtt:1883"
|
13
examples/docker/docker-compose.yaml
Normal file
13
examples/docker/docker-compose.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
bffh:
|
||||
image: registry.gitlab.com/fabinfra/fabaccess/bffh:dev-latest
|
||||
ports:
|
||||
- "59661:59661"
|
||||
volumes:
|
||||
# generate a sample config.toml by running "docker run registry.gitlab.com/fabinfra/fabaccess/bffh:dev-latest --print-default > examples/config.toml" from the project root. You may have to delete the ipv6 listen section.
|
||||
- "$PWD/examples/docker:/etc/bffh"
|
||||
links:
|
||||
- mqtt
|
||||
mqtt:
|
||||
image: eclipse-mosquitto
|
14
examples/docker/machines.toml
Normal file
14
examples/docker/machines.toml
Normal file
@ -0,0 +1,14 @@
|
||||
[e5408099-d3e5-440b-a92b-3aabf7683d6b]
|
||||
name = "Somemachine"
|
||||
disclose = "lab.some.disclose"
|
||||
read = "lab.some.read"
|
||||
write = "lab.some.write"
|
||||
manage = "lab.some.admin"
|
||||
|
||||
[eaabebae-34d1-4a3a-912a-967b495d3d6e]
|
||||
name = "Testmachine"
|
||||
description = "An optional description"
|
||||
disclose = "lab.test.read"
|
||||
read = "lab.test.read"
|
||||
write = "lab.test.write"
|
||||
manage = "lab.test.admin"
|
20
examples/docker/roles.toml
Normal file
20
examples/docker/roles.toml
Normal file
@ -0,0 +1,20 @@
|
||||
[testrole]
|
||||
name = "Testrole"
|
||||
permissions = [
|
||||
"lab.test.*"
|
||||
]
|
||||
|
||||
[somerole]
|
||||
name = "Somerole"
|
||||
parents = ["testparent%lmdb"]
|
||||
permissions = [
|
||||
"lab.some.admin"
|
||||
]
|
||||
|
||||
[testparent]
|
||||
name = "Testparent"
|
||||
permissions = [
|
||||
"lab.some.write",
|
||||
"lab.some.read",
|
||||
"lab.some.disclose",
|
||||
]
|
Loading…
Reference in New Issue
Block a user