mirror of
https://forge.katzen.cafe/katzen-cafe/katzen-cafe.git
synced 2024-12-23 10:35:51 +01:00
50 lines
1.5 KiB
Nix
50 lines
1.5 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 = "iceshrimp.dev/iceshrimp/iceshrimp:latest";
|
|
container_name = "calckey_web";
|
|
restart = "unless-stopped";
|
|
depends_on = [ "db" "redis" ];
|
|
ports = [ "3000:3000" ];
|
|
networks = [ "calcnet" ];
|
|
environment = {
|
|
"NODE_ENV" = "production";
|
|
};
|
|
volumes = [
|
|
"/calckey/files:/iceshrimp/files"
|
|
"/calckey/config:/iceshrimp/.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"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|