Created
November 22, 2015 04:05
-
-
Save ryantrinkle/3e1a8e444c0b22f27c37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
networking.nat = { | |
enable = true; | |
internalInterfaces = ["ve-+"]; | |
externalInterface = "enp6s0"; | |
forwardPorts = [ | |
{ sourcePort = 3000; destination = "192.168.100.2:3000"; } | |
]; | |
}; | |
containers = { | |
gitlab = { | |
autoStart = true; | |
privateNetwork = true; | |
hostAddress = "192.168.100.1"; | |
localAddress = "192.168.100.2"; | |
config = { config, pkgs, ... }: { | |
networking.firewall.enable = false; | |
networking.firewall.allowedTCPPorts = [ | |
3000 # nginx -> gitlab | |
]; | |
services.gitlab = { | |
enable = true; | |
host = "obsidianinc.dyndns.org"; | |
port = 3000; | |
emailFrom = "[email protected]"; | |
databasePassword = "gitlab"; | |
}; | |
services.postgresql = { | |
enable = true; | |
package = pkgs.postgresql94; | |
initialScript = builtins.toFile "init.sql" '' | |
create user gitlab password 'gitlab'; | |
create database gitlab owner gitlab; | |
''; | |
}; | |
services.nginx = { | |
enable = true; | |
httpConfig = '' | |
server { | |
listen 3000; | |
location / { | |
proxy_pass http://127.0.0.1:8080; | |
proxy_set_header Host $http_host; | |
proxy_read_timeout 300s; | |
} | |
access_log off; | |
} | |
''; | |
}; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment