diff --git a/Dockerfile b/Dockerfile index c492217..15b9a05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ FROM debian:buster-slim RUN apt-get update && apt-get upgrade -yqq RUN apt-get install -yqq libgsasl7 && rm -rf /var/lib/apt/lists/* COPY --from=builder /usr/local/cargo/bin/diflouroborane /usr/local/bin/diflouroborane -COPY --from=builder /usr/src/bffh/examples/bffh.dhall /etc/diflouroborane.dhall +#COPY --from=builder /usr/src/bffh/examples/bffh.dhall /etc/diflouroborane.dhall # RUN diflouroborane --print-default > /etc/diflouroborane.toml -VOLUME /etc/diflouroborane.dhall +VOLUME /etc/bffh/ EXPOSE 59661 -ENTRYPOINT ["diflouroborane"] +ENTRYPOINT ["sh", "-c", "diflouroborane -c /etc/bffh/bffh.dhall --load=/etc/bffh; diflouroborane -c /etc/bffh/bffh.dhall"] diff --git a/examples/docker/config.toml b/examples/docker/config.toml deleted file mode 100644 index 1da876c..0000000 --- a/examples/docker/config.toml +++ /dev/null @@ -1,12 +0,0 @@ -machines = "/etc/bffh/machines.toml" - -[[listens]] -address = "127.0.0.1" -port = 59661 - -[[listens]] -address = "::1" -port = 59661 - -[shelly] -mqtt_url = "mqtt:1883" diff --git a/examples/docker/docker-compose.yaml b/examples/docker/docker-compose.yaml index 4442b18..a4746b9 100644 --- a/examples/docker/docker-compose.yaml +++ b/examples/docker/docker-compose.yaml @@ -6,7 +6,7 @@ services: - "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" + - "$PWD/../:/etc/bffh" links: - mqtt mqtt: diff --git a/examples/docker/machines.toml b/examples/docker/machines.toml deleted file mode 100644 index 866aef1..0000000 --- a/examples/docker/machines.toml +++ /dev/null @@ -1,14 +0,0 @@ -[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" diff --git a/examples/docker/roles.toml b/examples/docker/roles.toml deleted file mode 100644 index cc61b71..0000000 --- a/examples/docker/roles.toml +++ /dev/null @@ -1,20 +0,0 @@ -[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", -]