Gitea: Code Hosting and Versioning on Docker

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys how's it going hope everybody's doing well out there uh in my last live stream i showed how to install gitlab in docker and i had a few people during the live stream and even a few people after the live stream tell me that uh get t uh g-i-t-e-a uh is a great alternative to that uh that i guess takes a fewer system resources that sort of thing i know gitlab is kind of a resource hog so uh in this video what i want to show is how to install uh get t i i hope that's how it's pronounced anyway and docker and just kind of go through that process for a local install so let's jump over to my desktop and take a look at how to do this okay so here we are on their official website at getty.io and basically it's saying here it's a community manager lightweight code hosting solutions written in go and it's published under the mit license so um i mean if you're not familiar with this it's it's a get platform like github but self-hosted or again like gitlab like we talked about last sunday during the live stream uh basically this is uh their website and all of this of course will be linked in the description down below so um there are a few different ways you can go about installing this and setting this up but if we head over to their installation docs there's a whole section about doing this with docker and i highly recommend that you take a look at this page because there is some information in here you may want to take a look at first off we've just got a basic install this doesn't have any kind of a database or anything like that on it and that's that's not super helpful in my opinion so if we scroll down a little further there are some different options as far as ports uh if we go a little further uh here we go here's the version with the mysql database and basically you can kind of see in here how they've um how they've added a little plus where they've added things and that's cute and whatnot other than i had to go back through and manually reformat the whole stack because otherwise pertainer wouldn't use it so um i've gone ahead and done that however there is um there's a the there's another option here for postgres um there's named volumes if you want to do that i've already done that in my setup but but basically this is uh the the the basic install now keep in mind that there may be other environmental variables that you'll want to take a look at and possibly add when you're going through this setup process in your uh your docker compose or your stack and i will have links to all of that in the description down below as well but if we scroll over to the next tab uh here is the stack that i created uh for the sake of this video again linked in the description down below uh so you can copy this and and kind of follow along here um and of course that's just a duplication of the other tab so here we can see that i've already got this stack in here in my portainer setup and if we open this up basically you can see that all of this is going to be basically the same as that dope this one right here other than i've cleaned it up and kind of reformatted it to uh to work in portainer so if we just kind of jump in here real quick we can see it's a version three as long as you're on version uh 2.11 or higher you should be fine versions lower than that won't support a stack this high in that case you should be able to change that to version two you may have to modify some things in the stack down below but a version two should be fine but again if you're current version 3 will work without issue you will notice here that i'm on version 2.5.0 because for some reason it got released uh temporarily apparently i think it was preemptively released and i just managed to grab a hold of a copy of it before it went away um so let's not pay attention any attention to that for the time being but basically so we've got version three uh we're going to create a get t uh external network or rather external will be false in that case below that we've got our services the first one is the the get server uh we've got the image that we're gonna pull there that is the official version i believe you may be able to even change this uh to latest if you wanted to do that uh this is the specific version that was uh referenced in this uh this stack or the stalker compose uh so that's just what i went with here at the container name because because we're setting this up in a in a docker or sorry in portainer you don't need this this container name line but if it's there it's not going to hurt anything below that we've got some environmental variables the first is the user id and then the group id if you're not sure how to get those i am on uh in this case open media vault and so basically in order to get that uh what i would do in fact i'm just going to pull this up real quick i'll just log into my server like so and login as root because i can but basically when i log into openmediavault um and portain or all of that i just leave the username as admin so what you can do to get your id would be just you type in id and then whatever username you use to log into openmediavault in this particular case uh so i would oops uh awful i'll set there like so and here we can see uid 998 gid 100 so uid gid that's where those came in below that we've got all the database configuration stuff for mysql uh the database host username password uh database name things like that below that uh restart always good option to have most of the time uh below that again we're gonna use the getty network um and then we've got volumes uh the first one right here uh is for the configuration for the data that'll be stored in git here uh below that we've got a couple of uh time zone uh volumes one for local time one for time zone uh that's just to help keep everything synchronized upload that we've got a couple of ports uh port uh 3000 will be your your dashboard what you're going to log into for the the desktop experience on the website and then port 2234 in this case uh was originally 22 but i changed it because uh port 22 was already being used on my system uh for well for for for ssh into the system so i changed it to 2234 and then below that it depends on the database which we're going to take a look at next uh here we're going oops here we're going to look at using mysql version 5.7 again we're always going to restart that we've got our our my sql variables here for password user password database um and then networks and then volumes again we're mapping all of those uh one thing i will say is don't leave your username and password uh as uh getty just just don't it's a bad practice like it's one thing if you're only gonna have it accessible on your home network uh but but definitely if you're going to have this accessible from uh from a remote location uh change all of these uh to something uh other than this so that you don't have just the default stuff in there for security reasons so once we've got our stack in here uh we're basically good to go what i did want to show you real quick though is if i jump over to my images and take a look at this uh this particular image uh right here is only 158.8 megabytes and then uh your my sequel is another 447. so you're about 700 megs in for your download uh so just something to keep in mind when you're doing this if you're on a capped system where you're wondering how long it's going to take to download you should be able to extrapolate the numbers based on your connection speed things like that so what i'm going to do is close that tab and then i'm just going to scroll down and yours will say deploy the stack i'm just going to update the stack i already had this set up and running actually one more thing that i want to do now that i think about it is i want to see the into srv slash conf and i take a look in there i just wanted to make sure i didn't have any addition or any existing folders from previous testing that sort of thing i don't so at this point we're basically good to go so i'm going to go ahead and just click the big blue button and we'll hang out and give this a couple of minutes to do its thing it won't take me very long here uh because i've already downloaded the images but uh we'll give this a second and there it is uh so next we can just jump back over to here and open port 3000 and here we go uh here here's all of our configuration stuff where it's automatically pre-filled all of our database configuration stuff so you should be able to leave this alone as it is uh below that you can change the site title uh you can change your repository root path uh you can change all of these different paths um if you change this get run as username get uh you may run into issues so if you want to change that make sure that you set up a user and give it the proper permissions for this to work the ssh server domain i'm actually going to change just here real quick like so um oops like so our server ssh port is 2234. our listen port is 3000 and then again same thing here i'm going to change that oops to the base url of our server in this case uh so basically at that point all of the basic stuff is good to go uh there are some additional settings here if you want to set up email servers uh that sort of thing you can put that information in third party service settings uh you can enable all of this stuff as necessary for your setup and then administrator account settings uh go ahead and create this i'm gonna call this db tech so oops dot com like so and then i should be able to just click get ea or sorry get um that one still gets me um but basically we'll just go ahead and give this a chance to run its installation and if we come back over here uh we can see that definitely something is happening as far as networking is concerned if we jump over to here again same thing it's just kind of doing some stuff in the background not too much but we'll give this a minute and then hopefully we'll be brought to a login screen next all right so it's somehow managed to log me in uh so let's go ahead and take a look at site administration uh basically uh here you go here's all of the stuff that you would need as an administrator to uh delete all unactivated accounts or delete repository archives or whatever it is you need to do in here to administer uh your setup uh basically here at this point you can get some system stats as far as how long it's been up uh memory usage memory allocation uh all kinds of stuff in here as well that you can look through uh there are user accounts in here that you can take a look at organizations repositories web hooks authentication sources and so you can you can read this i i trust you so basically at this point i would not use this account to uh to actually uh do your your code hosting i think that's just a bad practice to use your admin as your user so i would definitely set up an additional account for the sake of uh setting up your code hosting as a different account entirely so the the next step that i would normally show at this point is actually how to use the software but uh explaining git in a video uh is kind of outside the scope of this particular video it may be something that we address uh separately at another time there are tons and tons and tons of really good get videos out there though um and even the software when you create your first repository will go through the process of telling you uh what you need to type into each or type into your terminal to get things set up so i don't want to go into any of the actual using get that's a whole separate topic in and of itself but what i wanted to focus on in this video was just setting up getty uh so that you can have your own code hosting repository uh for storing your code for sharing your code keeping track and versioning your code things like that that's what i wanted to show was just setting up this server and we've done that so hopefully you found this video helpful and if you did it would really mean a lot to me if you give the video a thumbs up really would help me out with the channel quite a bit also again all of this will be linked in the description down below and while you're down there if you want to be like some of the other cool people who have supported the channel whether it's through paypal coffee patreon whatever uh you you can definitely do that also via the link in the description as well i want to give a big shout out to my current supporters you guys rock thank you so much for your support uh it is very much appreciated but with all that being said i'm gonna go ahead and wrap up this video so as always thanks for your time i always appreciate your support and i'll talk to you in the next video [Music] [Music] you
Info
Channel: DB Tech
Views: 21,654
Rating: undefined out of 5
Keywords: DB Tech, Docker tutorial, Portainer tutorial, docker and portainer, How to Install Gitea Docker, How to Install Gitea on Docker, Install Gitea on Docker, Gitea on Docker, How to Install Gitea on OpenMediaVault and Docker, How to Install Gitea on OpenMediaVault, Install Gitea on OpenMediaVault, self-hosted code server, self-hosted code repository, self-hosted git, self-hosted gitea
Id: oklkcFY8sHE
Channel Id: undefined
Length: 13min 3sec (783 seconds)
Published: Thu May 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.