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 = {
webserver = { image = {
image.enableRecommendedContents = true; enableRecommendedContents = true;
service.useHostStore = true; };
service.command = [ "sh" "-c" '' service = {
cd "$$WEB_ROOT" image = "codeberg.org/forgejo/forgejo:9";
${pkgs.python3}/bin/python -m http.server container_name = "forgejo";
'' ]; environment = {
service.ports = [ "USER_UID=1000",
"8009:8000" # host:container "USER_GID=1000"
};
restart = "always";
networks = ["forgejo"];
volumes = [
"./forgejo:/data",
"/etc/timezone:/etc/timezone:ro",
"/etc/localtime:/etc/localtime:ro"
]; ];
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual"; ports = [
service.stop_signal = "SIGINT"; "3000:3000",
"222:22"
];
##
#useHostStore = true;
#command = [ "sh" "-c" ''
# cd "$$WEB_ROOT"
# ${pkgs.python3}/bin/python -m http.server
# '' ];
#ports = [
# "8009:8000" # host:container
#];
#environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
#stop_signal = "SIGINT";
};
}; };
}; };
} }