try configuring forgejo
This commit is contained in:
parent
b61fb9bf90
commit
d905381812
1 changed files with 41 additions and 13 deletions
|
|
@ -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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue