Need unique env names
This commit is contained in:
parent
f4c06f7faa
commit
39e9b4e5f4
@ -215,7 +215,7 @@ in {
|
|||||||
|
|
||||||
fudo.secrets.host-secrets."${config.instance.hostname}" = let
|
fudo.secrets.host-secrets."${config.instance.hostname}" = let
|
||||||
in {
|
in {
|
||||||
commonEnv = {
|
mastodonCommonEnv = {
|
||||||
source-file = makeEnvFile {
|
source-file = makeEnvFile {
|
||||||
LOCAL_DOMAIN = cfg.hostname;
|
LOCAL_DOMAIN = cfg.hostname;
|
||||||
WEB_DOMAIN = cfg.web-domain;
|
WEB_DOMAIN = cfg.web-domain;
|
||||||
@ -229,7 +229,7 @@ in {
|
|||||||
};
|
};
|
||||||
target-file = "/run/mastodon/common.env";
|
target-file = "/run/mastodon/common.env";
|
||||||
};
|
};
|
||||||
postgresEnv = {
|
mastodonPostgresEnv = {
|
||||||
source-file = makeEnvFile {
|
source-file = makeEnvFile {
|
||||||
DB_HOST = "/var/run/postgresql";
|
DB_HOST = "/var/run/postgresql";
|
||||||
POSTGRES_USER = "mastodon";
|
POSTGRES_USER = "mastodon";
|
||||||
@ -282,8 +282,8 @@ in {
|
|||||||
networks = [ "internal_network" ];
|
networks = [ "internal_network" ];
|
||||||
user = mkUserMap cfg.uids.postgres;
|
user = mkUserMap cfg.uids.postgres;
|
||||||
env_file = [
|
env_file = [
|
||||||
hostSecrets.commonEnv.target-file
|
hostSecrets.mastodonCommonEnv.target-file
|
||||||
hostSecrets.postgresEnv.target-file
|
hostSecrets.mastodonPostgresEnv.target-file
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
redis.service = {
|
redis.service = {
|
||||||
@ -293,7 +293,7 @@ in {
|
|||||||
healthcheck.test = [ "CMD" "redis-cli" "ping" ];
|
healthcheck.test = [ "CMD" "redis-cli" "ping" ];
|
||||||
networks = [ "internal_network" ];
|
networks = [ "internal_network" ];
|
||||||
user = mkUserMap cfg.uids.redis;
|
user = mkUserMap cfg.uids.redis;
|
||||||
env_file = [ hostSecrets.commonEnv.target-file ];
|
env_file = [ hostSecrets.mastodonCommonEnv.target-file ];
|
||||||
};
|
};
|
||||||
web.service = {
|
web.service = {
|
||||||
image = cfg.images.mastodon;
|
image = cfg.images.mastodon;
|
||||||
@ -311,7 +311,7 @@ in {
|
|||||||
networks = [ "internal_network" ];
|
networks = [ "internal_network" ];
|
||||||
user = mkUserMap cfg.uids.mastodon;
|
user = mkUserMap cfg.uids.mastodon;
|
||||||
env_file = [
|
env_file = [
|
||||||
hostSecrets.commonEnv.target-file
|
hostSecrets.mastodonCommonEnv.target-file
|
||||||
hostSecrets.mastodonEnv.target-file
|
hostSecrets.mastodonEnv.target-file
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -327,7 +327,7 @@ in {
|
|||||||
depends_on = [ "postgres" "redis" ];
|
depends_on = [ "postgres" "redis" ];
|
||||||
networks = [ "internal_network" ];
|
networks = [ "internal_network" ];
|
||||||
env_file = [
|
env_file = [
|
||||||
hostSecrets.commonEnv.target-file
|
hostSecrets.mastodonCommonEnv.target-file
|
||||||
hostSecrets.mastodonEnv.target-file
|
hostSecrets.mastodonEnv.target-file
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -343,7 +343,7 @@ in {
|
|||||||
networks = [ "internal_network" "external_network" ];
|
networks = [ "internal_network" "external_network" ];
|
||||||
user = mkUserMap cfg.uids.mastodon;
|
user = mkUserMap cfg.uids.mastodon;
|
||||||
env_file = [
|
env_file = [
|
||||||
hostSecrets.commonEnv.target-file
|
hostSecrets.mastodonCommonEnv.target-file
|
||||||
hostSecrets.mastodonEnv.target-file
|
hostSecrets.mastodonEnv.target-file
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user