Skip to content

Commit

Permalink
build: gitlab via nixos
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Oct 26, 2024
1 parent 3cc1d97 commit 8eb5aee
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 23 deletions.
32 changes: 16 additions & 16 deletions nixos/kolyma-2/services/container.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
# / / __/ / __/ / / __ `/ __ \
# / /_/ / / /_/ /___/ /_/ / /_/ /
# \____/_/\__/_____/\__,_/_.___/
git = {
image = "gitlab/gitlab-ee:latest";
hostname = "git.kolyma.uz";
volumes = [
"/srv/git/config:/etc/gitlab"
"/srv/git/logs:/var/log/gitlab"
"/srv/git/data:/var/opt/gitlab"
];
ports = [
"8450:80"
"22:22"
];
extraOptions = [
"--shm-size=268435456"
];
};
# git = {
# image = "gitlab/gitlab-ee:latest";
# hostname = "git.kolyma.uz";
# volumes = [
# "/srv/git/config:/etc/gitlab"
# "/srv/git/logs:/var/log/gitlab"
# "/srv/git/data:/var/opt/gitlab"
# ];
# ports = [
# "8450:80"
# "22:22"
# ];
# extraOptions = [
# "--shm-size=268435456"
# ];
# };

# _____ __ __ __
# / ___// /_____ _/ / ______ ______/ /_
Expand Down
2 changes: 1 addition & 1 deletion nixos/kolyma-2/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
./www.nix

# GitLab server
# ./gitlab.nix
./gitlab.nix
];
}
23 changes: 17 additions & 6 deletions nixos/kolyma-2/services/gitlab.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@
};
};

services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
localhost = {
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
# services.nginx = {
# enable = true;
# recommendedProxySettings = true;
# virtualHosts = {
# localhost = {
# locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
# };
# };
# };

# Enable web server & proxy
services.www = {
hosts = {
"git.kolyma.uz" = {
extraConfig = ''
reverse_proxy unix//run/gitlab/gitlab-workhorse.socket
'';
};
};
};
Expand Down

0 comments on commit 8eb5aee

Please sign in to comment.