63 lines
1.3 KiB
Nix
63 lines
1.3 KiB
Nix
{ config, ... }:
|
|
|
|
let
|
|
workDir = "/srv/containers/clementines";
|
|
in
|
|
{
|
|
systemd.tmpfiles.rules = [
|
|
"d ${workDir}/dbdata 2770 root admin"
|
|
"d ${workDir}/dbetclocal 2770 root admin"
|
|
];
|
|
|
|
virtualisation.oci-containers.containers = {
|
|
clementines-couchdb = {
|
|
autoStart = true;
|
|
image = "couchdb";
|
|
|
|
ports = [
|
|
"0.0.0.0:10010:5984"
|
|
];
|
|
|
|
volumes = [
|
|
"${workDir}/dbdata:/opt/couchdb/data"
|
|
"${workDir}/dbetclocal:/opt/couchdb/etc/local.d"
|
|
];
|
|
|
|
environmentFiles = [
|
|
config.age.secrets.clementines.path
|
|
];
|
|
|
|
extraOptions = [
|
|
"--group-add=10000"
|
|
];
|
|
};
|
|
|
|
clementines-frontend = {
|
|
autoStart = true;
|
|
|
|
image = "ghcr.io/davideshay/groceries-client:latest";
|
|
|
|
ports = [
|
|
"0.0.0.0:10011:8100"
|
|
];
|
|
};
|
|
|
|
clementines-backend = {
|
|
autoStart = true;
|
|
|
|
image = "ghcr.io/davideshay/groceries-server:latest";
|
|
|
|
ports = [
|
|
"0.0.0.0:10012:3333"
|
|
];
|
|
|
|
environmentFiles = [
|
|
config.age.secrets.clementines.path
|
|
];
|
|
|
|
dependsOn = [ "clementines-couchdb" ];
|
|
};
|
|
|
|
};
|
|
}
|