Comments (12)
What OS do you use?
from gitlab-recipes.
I'm just one of those crazy damn arch linux users.
For what it's worth, RHEL and distros based on it are confirmed to be moving to systemd (replacing upstart and sysvinit) in the future, so might as well get ahead of the game.
from gitlab-recipes.
This would be great. Many distros are adopting systemd and apparently the unit files (equivilent of init.d scripts) are pretty easy to write. See: http://fedoraproject.org/wiki/Packaging:Systemd#Unit_Files
OSs that currently use systemd:
- Arch Linux
- Fedora 15+
- Frugalware 1.5+
- Mageia 2
- Mandriva 2011+
- openSUSE 12.1+
OSs soon/likely to be moving to / supporting systemd:
- Debian
- Gentoo
- Red Hat Enterprise Linux 7
Also:
systemd has been proposed as an external dependency of GNOME 3.2 by the project's author.[8] This would essentially require all distributions that use GNOME to use systemd, or at least include it as a configurable option.
from gitlab-recipes.
Also:
systemd has been proposed as an external dependency of GNOME 3.2 by the project's author.[8] This would essentially require all distributions that use GNOME to use systemd, or at least include it as a configurable option.
gnome 3.6 was just recently released fyi - still no dependency on it that I know of.
Another good resource: https://wiki.archlinux.org/index.php/Systemd#Writing_custom_.service_files
from gitlab-recipes.
Hi. I got round to doing this so here it is below. Man! Now that I've learnt systemd, it really like it!!
/etc/systemd/system/gitlab.service
:
[Unit]
Description=Self Hosted Git Management
Requires=postgresql.service redis.service
After=postgresql.service redis.service
Wants=postfix.service gitlab-worker.service
[Service]
Type=forking
User=gitlab
WorkingDirectory=/home/gitlab/gitlab
ExecStart=/home/gitlab/gitlab/script/rails server -d -e production
PIDFile=/home/gitlab/gitlab/tmp/pids/server.pid
[Install]
WantedBy=multi-user.target
/etc/systemd/system/gitlab-worker.service
:
[Unit]
Description=Gitlab Resque Worker
Requires=redis.service
After=redis.service
Wants=postfix.service postgresql.service
[Service]
Type=forking
User=gitlab
WorkingDirectory=/home/gitlab/gitlab
ExecStart=/bin/bash -c '. ~/.bashrc; . ./resque.sh'
ExecStopPost=/usr/bin/rm /home/gitlab/gitlab/tmp/pids/resque_worker.pid
PIDFile=/home/gitlab/gitlab/tmp/pids/resque_worker.pid
from gitlab-recipes.
should note that will only work for gitlab+pgsql installations.
perhaps it shouldn't use a wants for postgresql? i imagine, because it is sqlite compatible too, it could just want postgres and mysql, and not require either.
from gitlab-recipes.
Yeah I agree, it would be problematic if this were installed indiscriminately. I don't know that there's a way to create a single file that will be solid for sqlite/mysql/postgresql users. This works well for me on postgresql. Maybe if this is installed via script or something then it can substitute or remove with regex?
from gitlab-recipes.
@japgolly Looking at the arch wiki, I'd say that just using wants+after would be most appropriate.
If the dependency is optional, add
Wants=B
andAfter=B
instead.
So, by moving postgres out of Requires
and into Wants
(and keeping it in After
) it should allow it to work properly with neither present or with one of the two installed.
from gitlab-recipes.
I see what you're saying but the problem with that is when people are using postgresql or mysql, it's not optional. For their installations requires=postgres
or requires=mysql
is valid and accurate. Like on my installation it shouldn't try to bring up gitlab if postgresql fails.
I think people should keep the units the way they are but either change postgresql to mysql or remove it completely if they use sqlite.
from gitlab-recipes.
Seeing as sqlite support is being dropped, looks like it'll be postgres/mysql only here.
from gitlab-recipes.
updated units
https://gist.github.com/veprbl/5115638
from gitlab-recipes.
I provided some service files based on many suggestions that play with Fedora (see above commit). Haven't tested with Arch yet. Feedback welcomed :)
from gitlab-recipes.
Related Issues (20)
- how to configure nginx to service GitLab? HOT 3
- gitlab not work , please help me thanks !! HOT 1
- Tiny error in "Add EPEL repository" chapter of centos recipe HOT 2
- About gitlab-shell version and errors happening when double-check status.
- Configure Apache Show wget 404 HOT 1
- Parametrize apache configuration HOT 1
- [Guide] FreeBSD 10 - installing libv8 (3.16.14.7). HOT 2
- FreeBSD installation - use port instead of manual steps? HOT 3
- Arch Linux links outdated HOT 2
- Non-bundled nginx with https recipe is probably incorrect
- systemd sidekiq service misses some queues
- Omnibus GitLab and Plesk 17 onyx using SSL HOT 3
- NE flag in apache2 vhosts rewrite rule blocks opening whitespaced filenames
- Can you provide a GitLab/Gitaly startup service for systemd? HOT 1
- gitaly not starting after 9.4 update HOT 4
- Forgot to mention gitaly start HOT 1
- Caddy recipe does not work using docker-compose.yml configuration HOT 3
- Current status of this project HOT 1
- Gitlab with Apache 2.4 gives 502: AH01102: error reading status line from remote server 127.0.0.1:8080
- Apache2 / ISPConfig Proxy w. GitLab 502 Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitlab-recipes.