You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 2, 2017. It is now read-only.
* Run as service in Ubuntu 16.04 via supervisor
* Updated mkdir command as sudo not required for user home dir
* Updates: added empty lines, ref and fixed few typos
* Updates: added empty line
* Updates: added identifier changes
* Newline after Run as service line
* Added systemd service
* Removed systemd title
* Fix typo
* Fixed invalid MD syntax, moved systemd to the top
* Removed code part
Copy file name to clipboardExpand all lines: content/doc/installation/run-as-service-in-ubuntu.en-us.md
+39-24Lines changed: 39 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -15,39 +15,54 @@ menu:
15
15
16
16
### Run as service in Ubuntu 16.04 LTS
17
17
18
+
#### Using systemd
19
+
20
+
Run below command in terminal:
21
+
```
22
+
sudo vim /etc/systemd/system/gitea.service
23
+
```
24
+
25
+
Add code to the file from [here](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service).
26
+
27
+
Uncomment any service need to be enabled like mysql in this case in Unit section.
28
+
29
+
Change the user(git) accordingly to yours. And /home/git too if your username is different than git. Change the PORT or remove the -p flag if default port is used.
30
+
31
+
Lastly start and enable gitea at boot:
32
+
```
33
+
sudo systemctl start gitea
34
+
```
35
+
```
36
+
sudo systemctl enable gitea
37
+
```
38
+
39
+
18
40
#### Using supervisor
19
41
20
42
Install supervisor by running below command in terminal:
21
-
```sudo apt install supervisor```
43
+
```
44
+
sudo apt install supervisor
45
+
```
22
46
23
47
Create a log dir for the supervisor logs(assuming gitea is installed in /home/git/gitea/):
24
-
```mkdir /home/git/gitea/log/supervisor```
48
+
```
49
+
mkdir /home/git/gitea/log/supervisor
50
+
```
25
51
26
52
Open supervisor config file in vi/vim/nano etc.
27
-
```sudo vim /etc/supervisor/supervisord.conf```
28
-
29
-
And append the following code at the end of the file, [reference](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea):
And append the code at the end of the file from [here](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea).
58
+
49
59
Change the user(git) accordingly to yours. And /home/git too if your username is different than git. Change the PORT or remove the -p flag if default port is used.
0 commit comments