calculate the key (install calckey)

This commit is contained in:
Schrottkatze 2023-05-06 03:19:19 +02:00
parent f9f9db7891
commit 79834e2953
5 changed files with 85 additions and 8 deletions

View file

@ -0,0 +1,50 @@
{ pkgs, inputs, ... }:
{
imports = [ inputs.arion.nixosModules.arion ];
virtualisation.docker.enable = true;
virtualisation.arion = {
backend = "docker";
projects.calckey.settings = {
networks.calcnet.name = "calcnet";
services = {
"web".service = {
image = "docker.io/waterdev/calckey_arm";
container_name = "calckey_web";
restart = "unless-stopped";
depends_on = [ "db" "redis" ];
ports = [ "3000:3000" ];
networks = [ "calcnet" ];
environment = {
"NODE_ENV" = "production";
};
volumes = [
"/calckey/files:/calckey/files"
"/calckey/config:/calckey/.config:ro"
];
};
"redis".service = {
image = "docker.io/redis:7.0-alpine";
container_name = "calckey_redis";
restart = "unless-stopped";
networks = [ "calcnet" ];
volumes = [ "/calckey/redis:/data" ];
};
"db".service = {
image = "docker.io/postgres:12.2-alpine";
container_name = "calckey_db";
restart = "unless-stopped";
networks = [ "calcnet" ];
environment = {
POSTGRES_PASSWORD = "calckey";
POSTGRES_USER = "calckey";
POSTGRES_DB = "calckey";
};
volumes = [
"/calckey/db:/var/lib/postgresql/data"
];
};
};
};
};
}

View file

@ -2,6 +2,7 @@
{
imports = [
./phtanumb-wiki.nix
./calckey.nix
./penpot.nix
];
}