diff --git a/hosts/luna/modules/docker/gitlab.nix b/hosts/luna/modules/docker/gitlab.nix index 4f71712..17f874f 100644 --- a/hosts/luna/modules/docker/gitlab.nix +++ b/hosts/luna/modules/docker/gitlab.nix @@ -7,6 +7,16 @@ in environment.persistence.save.directories = [ gitlab_home ]; + + systemd.timers.delay-gitlab-start = { + after = [ "docker.service" "docker.socket" "network-online.target" ]; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnActiveSec = "30sec"; + Unit = "docker-gitlab.service"; + }; + }; + virtualisation.oci-containers.containers.gitlab = { image = "gitlab/gitlab-ee:latest"; autoStart = true; @@ -26,6 +36,8 @@ in ]; }; + systemd.services.docker-gitlab.after = [ "delay-gitlab.timer" ]; + networking.firewall.allowedTCPPorts = [ 2222 ];