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, ... }:
|
||||
{
|
||||
project.name = "webapp";
|
||||
project.name = "forgejo";
|
||||
networks = {
|
||||
forgejo = {
|
||||
external = false;
|
||||
};
|
||||
};
|
||||
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;
|
||||
service.command = [ "sh" "-c" ''
|
||||
cd "$$WEB_ROOT"
|
||||
${pkgs.python3}/bin/python -m http.server
|
||||
'' ];
|
||||
service.ports = [
|
||||
"8009:8000" # host:container
|
||||
];
|
||||
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
|
||||
service.stop_signal = "SIGINT";
|
||||
|
||||
##
|
||||
#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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue