mirror of
https://forge.katzen.cafe/katzen-cafe/katzen-cafe.git
synced 2024-12-01 17:28:44 +01:00
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{ 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"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|