Last modified by Alexandru Pentilescu on 2024/07/16 22:44

From version 4.1
edited by Alexandru Pentilescu
on 2024/07/16 21:17
Change comment: There is no comment for this version
To version 6.1
edited by Alexandru Pentilescu
on 2024/07/16 21:25
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,6 +1,9 @@
1 -{{box cssClass="floatinginfobox" title="**Contents**"}}{{toc /}}{{/box}}
1 +{{box cssClass="floatinginfobox" title="**Contents**"}}
2 +{{toc /}}
3 +{{/box}}
2 2  
3 3  = Basic installation =
6 +
4 4  To setup a gitea server using docker, the following docker-compose.yml file shall be used:
5 5  
6 6  {{code language="yaml"}}
... ... @@ -49,12 +49,11 @@
49 49  
50 50  Do a simple command to create the necessary directories:
51 51  
52 -{{code language="bash"}}
53 -mkdir data db
54 -{{/code}}
55 +{{code language="bash"}}mkdir data db{{/code}}
55 55  Backing up just these two directories should, in theory, be enough to allow for full restoration of all git repository resources into the future. **WARNING: This has not been tested yet!!!**
56 56  
57 57  = Create a separate git user to login into via SSH =
59 +
58 58  Creating a separate user, technically, is unnecessary, but it makes the configuration more conventional.
59 59  
60 60  {{code language="bash"}}
... ... @@ -81,6 +81,7 @@
81 81  Had all the necessary steps been done properly, this should yield a fully functional container. If there are any errors encountered by this point, please fix them before proceeding.
82 82  
83 83  = Set up a proper nginx endpoint for the docker service =
86 +
84 84  Deploy the following configuration to make the container accessible to the outside world:
85 85  
86 86  {{code language="nginx"}}
... ... @@ -98,3 +98,54 @@
98 98   }
99 99  }
100 100  {{/code}}
104 +
105 +Once this is done, restart nginx:
106 +
107 +{{code language="bash"}}
108 +systemctl restart nginx
109 +{{/code}}
110 +
111 +Confirm that the web page is accessible at the git.transistor.one URL. In case it's not, fix it.
112 +
113 +# Customize Gitea configuration #
114 +
115 +Assuming you do need to change a couple of settings, gitea will have generated a configuration file at ./data/gitea/conf/app.ini.
116 +
117 +Make whatever changes you need to make in this file.
118 +
119 +The changes will take effect only after stopping and restarting the container, though.
120 +
121 +Notable changes that are worth mentioning is setting up an SMTP endpoint:
122 +
123 +{{code language="ini"}}
124 +[mailer]
125 +ENABLED = true
126 +PROTOCOL = smtp+starttls
127 +HOST = mail.transistor.one:587
128 +FROM = gitea@transistor.one
129 +USER =
130 +PASSWD =
131 +{{/code}}
132 +
133 +And, of course, the server hostname configuration:
134 +
135 +{{code language="ini"}}
136 +[server]
137 +APP_DATA_PATH = /data/gitea
138 +DOMAIN = transistor.one
139 +SSH_DOMAIN = transistor.one
140 +HTTP_PORT = 3000
141 +ROOT_URL = https://git.transistor.one/
142 +DISABLE_SSH = false
143 +SSH_PORT = 22
144 +SSH_LISTEN_PORT = 22
145 +{{/code}}
146 +
147 +Oh and, almost forgot, disable user registrations by setting
148 +
149 +{{code language="ini"}}
150 +[service]
151 +DISABLE_REGISTRATION = true
152 +{{/code}}
153 +
154 +If you need more configuration information, check [[this>>https://docs.gitea.com/administration/config-cheat-sheet]] out.