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;
|
||||
in
|
||||
{
|
||||
environment.etc."container-webserver/mosquitto/mosquitto.conf".text = ''
|
||||
environment.etc."container-webserver/mosquitto/mosquitto.conf" = {
|
||||
text = ''
|
||||
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" ];
|
||||
networks = [ "webserver" ];
|
||||
ports = [ "1883:1883" ];
|
||||
user = "1883";
|
||||
volumes = [
|
||||
"/etc/container-webserver/mosquitto:/mosquitto/config:ro"
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue