Oh, there's a nested 'service' attrset

This commit is contained in:
niten 2023-07-22 11:42:37 -07:00
parent 8e3499c303
commit 463c7f6b55
1 changed files with 24 additions and 18 deletions

View File

@ -19,28 +19,34 @@ let
project.name = "teslamate"; project.name = "teslamate";
services = { services = {
teslamate = { teslamate = {
image = teslaMateImage; service = {
restart = "always"; image = teslaMateImage;
volumes = [ "${stateDirectory}/import:/opt/app/import" ]; restart = "always";
ports = [ "4000:4000" ]; volumes = [ "${stateDirectory}/import:/opt/app/import" ];
user = [ "${teslaMateUid}:${teslaMateUid}" ]; ports = [ "4000:4000" ];
env_file = [ teslaMateEnvFile ]; user = [ "${teslaMateUid}:${teslaMateUid}" ];
cap_drop = "all"; env_file = [ teslaMateEnvFile ];
cap_drop = "all";
};
}; };
postgres = { postgres = {
image = postgresImage; service = {
restart = "always"; image = postgresImage;
volumes = [ "${stateDirectory}/postgres:/var/lib/postgresql/data" ]; restart = "always";
env_file = [ postgresEnvFile ]; volumes = [ "${stateDirectory}/postgres:/var/lib/postgresql/data" ];
user = [ "${postgresUid}:${postgresUid}" ]; env_file = [ postgresEnvFile ];
user = [ "${postgresUid}:${postgresUid}" ];
};
}; };
grafana = { grafana = {
image = grafanaImage; service = {
restart = "always"; image = grafanaImage;
volumes = [ "${stateDirectory}/grafana:/var/lib/grafana" ]; restart = "always";
env_file = [ grafanaEnvFile ]; volumes = [ "${stateDirectory}/grafana:/var/lib/grafana" ];
user = [ "${grafanaUid}:${grafanaUid}" ]; env_file = [ grafanaEnvFile ];
ports = [ "3000:3000" ]; user = [ "${grafanaUid}:${grafanaUid}" ];
ports = [ "3000:3000" ];
};
}; };
}; };
}; };