Skip to content
This repository was archived by the owner on Dec 2, 2017. It is now read-only.

Run as systemd service ubuntu #149

Merged
merged 12 commits into from
Sep 5, 2017

Conversation

mmarif4u
Copy link
Contributor

Added systemd service for Ubuntu 16.04 LTS.


Lastly start and enable gitea at boot:
```sudo systemctl start gitea```
```sudo systemctl enable gitea```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you enable the service first and then start it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter in systemd

```mkdir /home/git/gitea/log/supervisor```

Open supervisor config file in vi/vim/nano etc.
```sudo vim /etc/supervisor/supervisord.conf```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid markdown. ``` should always be on their own rows


Lastly start and enable gitea at boot:
```sudo systemctl start gitea```
```sudo systemctl enable gitea```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't matter in systemd

```sudo systemctl enable supervisor```


#### Using systemd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since systemd is the init-system of choice in Ubuntu this section should be above "Using supervisor" IMO

# repos with lots of files and get an HTTP error 500 because
# of that
###
LimitMEMLOCK=infinity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment out the Limits, as we already do in the contrib folder. Actually we could just link to that file.

```sudo vim /etc/supervisor/supervisord.conf```

And append the following code at the end of the file, [reference](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea):
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmarif4u
Copy link
Contributor Author

mmarif4u commented Sep 1, 2017

Please review.

@mmarif4u
Copy link
Contributor Author

mmarif4u commented Sep 1, 2017

Btw where it suppose to sit on the site?

@bkcsoft
Copy link
Member

bkcsoft commented Sep 1, 2017

It would end up under https://docs.gitea.io/en-us/linux-service/.

```

Add the following code to the file, [https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service):
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't include the full copy here, as it will become outdated at some point

```

And append the following code at the end of the file, [https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea):
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Don't include the full content only the link :)

@mmarif4u
Copy link
Contributor Author

mmarif4u commented Sep 2, 2017

Removed the code part.

@bkcsoft
Copy link
Member

bkcsoft commented Sep 4, 2017

LGTM

@appleboy
Copy link
Member

appleboy commented Sep 4, 2017

@mmarif4u Please help to fix the conflicts.

@mmarif4u
Copy link
Contributor Author

mmarif4u commented Sep 5, 2017

Fixed the conflicts and merged.

@strk
Copy link
Member

strk commented Sep 5, 2017

LGTM

@lafriks lafriks merged commit 0a31ea5 into go-gitea:master Sep 5, 2017
@mmarif4u mmarif4u deleted the run-as-service-ubuntu branch September 7, 2017 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants