webserver: Add mosquitto container
This commit is contained in:
parent
515610481e
commit
e59b059f7c
2 changed files with 17 additions and 5 deletions
|
@ -2,10 +2,21 @@ let
|
||||||
secret = import ../../../secret/container/webserver.nix;
|
secret = import ../../../secret/container/webserver.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.etc."container-webserver/mosquitto/mosquitto.conf".text = ''
|
environment.etc."container-webserver/mosquitto/mosquitto.conf" = {
|
||||||
listener 1883
|
text = ''
|
||||||
password_file /mosquitto/config/users.conf
|
listener 1883
|
||||||
'';
|
password_file /mosquitto/config/users.conf
|
||||||
|
'';
|
||||||
|
|
||||||
environment.etc."container-webserver/mosquitto/users.conf".text = secret.container.webserver.mosquitto.users;
|
mode = "0644";
|
||||||
|
uid = 1883;
|
||||||
|
gid = 1883;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."container-webserver/mosquitto/users.conf" = {
|
||||||
|
text = secret.container.webserver.mosquitto.users;
|
||||||
|
mode = "0644";
|
||||||
|
uid = 1883;
|
||||||
|
gid = 1883;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ in
|
||||||
depends_on = [ "ipv6nat" ];
|
depends_on = [ "ipv6nat" ];
|
||||||
networks = [ "webserver" ];
|
networks = [ "webserver" ];
|
||||||
ports = [ "1883:1883" ];
|
ports = [ "1883:1883" ];
|
||||||
|
user = "1883";
|
||||||
volumes = [
|
volumes = [
|
||||||
"/etc/container-webserver/mosquitto:/mosquitto/config:ro"
|
"/etc/container-webserver/mosquitto:/mosquitto/config:ro"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue