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

From version 2.1
edited by Alexandru Pentilescu
on 2024/07/16 20:56
Change comment: There is no comment for this version
To version 3.1
edited by Alexandru Pentilescu
on 2024/07/16 21:11
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -40,3 +40,32 @@
40 40   networks:
41 41   - gitea
42 42  {{/code}}
43 +
44 +What the above docker-compose configuration will do is that it will, in essence, create two, always on, services, that will forever be restarted: a mariadb database server that will write all of its data to a local "db" directory, and another web service that will server as the main git server and the web server alongside it.
45 +
46 +Before starting the docker services, please create the necessary resources first.
47 +
48 += Create the required local directories to store the data in =
49 +
50 +Do a simple command to create the necessary directories:
51 +
52 +{{code language="bash"}}
53 +mkdir data db
54 +{{/code}}
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 +
57 += Create a separate git user to login into via SSH =
58 +Creating a separate user, technically, is unnecessary, but it makes the configuration more conventional.
59 +
60 +{{code language="bash"}}
61 +useradd -m -u 1002 git
62 +{{/code}}
63 +
64 +Assuming the 1002 UID is already assigned to a different user, feel free to use a different UID (**be sure to update the yaml configuration with the proper user ID, then**).
65 +
66 +Once this configuration has been done, go ahead and generate an /home/git/.ssh/ directory for the user to have. Be sure to chown this specific directory to the git user as appropriate:
67 +
68 +{{code language="bash"}}
69 +chown git:git -R /home/git/.ssh/
70 +chmod 700 /home/git/.ssh/
71 +{{/code}}