try configuring forgejo

This commit is contained in:
Philip Peterson 2024-12-20 05:27:59 -05:00
parent b61fb9bf90
commit d905381812
No known key found for this signature in database
GPG key ID: 354311183FC6519B

View file

@ -1,20 +1,48 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
project.name = "webapp"; project.name = "forgejo";
networks = {
forgejo = {
external = false;
};
};
services = { services = {
server = {
image = {
enableRecommendedContents = true;
};
service = {
image = "codeberg.org/forgejo/forgejo:9";
container_name = "forgejo";
environment = {
"USER_UID=1000",
"USER_GID=1000"
};
restart = "always";
networks = ["forgejo"];
volumes = [
"./forgejo:/data",
"/etc/timezone:/etc/timezone:ro",
"/etc/localtime:/etc/localtime:ro"
];
ports = [
"3000:3000",
"222:22"
];
webserver = {
image.enableRecommendedContents = true; ##
service.useHostStore = true; #useHostStore = true;
service.command = [ "sh" "-c" '' #command = [ "sh" "-c" ''
cd "$$WEB_ROOT" # cd "$$WEB_ROOT"
${pkgs.python3}/bin/python -m http.server # ${pkgs.python3}/bin/python -m http.server
'' ]; # '' ];
service.ports = [ #ports = [
"8009:8000" # host:container # "8009:8000" # host:container
]; #];
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual"; #environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
service.stop_signal = "SIGINT"; #stop_signal = "SIGINT";
};
}; };
}; };
} }