[Unit] Description=GitLab Puma # Only start service when config/puma.rb exist ConditionFileNotEmpty=@GITLAB_CONFIG@/puma.rb Wants=redis.service After=redis.service # Add "postgresql-12.service" in Wants and After # if you're running PostgreSQL on the same machine as GitLab PartOf=gitlab.target After=network.target StartLimitIntervalSec=100s [Service] Type=notify User=git WorkingDirectory=@GITLAB@ Environment=RAILS_ENV=production Environment="RUBYOPT=--disable-did_you_mean" Environment=prometheus_multiproc_dir=@TMP_DIR@/prometheus_multiproc_dir EnvironmentFile=-/tmp/rubylib.env ExecStartPre=sh -c 'printf "%%s\n" RUBYLIB=$(find /usr/lib64/ruby/ -regextype egrep -iregex '.*rdoc-.*/lib') > /tmp/rubylib.env' ExecStart=@GITLAB@/bin/bundle exec puma -C @GITLAB_CONFIG@/puma.rb -e ${RAILS_ENV} --pidfile @TMP_DIR@/pids/puma.pid ExecReload=/usr/bin/kill -USR2 $MAINPID PIDFile=@TMP_DIR@/pids/puma.pid # puma can be slow to start TimeoutStartSec=120 WatchdogSec=10 Restart=on-failure RestartSec=1 SyslogIdentifier=gitlab-puma Slice=gitlab.slice [Install] WantedBy=gitlab.target