-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(git): ✨ Add an example git server for some testing
- Loading branch information
1 parent
4de90af
commit dd06152
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gitea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# README | ||
|
||
Gitea is a git server. | ||
|
||
## Start | ||
|
||
```sh | ||
cd 36_git/selfhost | ||
|
||
docker compose up | ||
|
||
open http://localhost:3000/ | ||
``` | ||
|
||
## Test | ||
|
||
* Create a new user | ||
* Initialise a repo | ||
|
||
```sh | ||
touch README.md | ||
git init | ||
git checkout -b main | ||
git add README.md | ||
git commit -m "first commit" | ||
git remote add origin http://localhost:3000/gittest/anothertest.git | ||
git push -u origin main | ||
``` | ||
|
||
## Cleanup | ||
|
||
```sh | ||
docker compose down | ||
``` | ||
|
||
## Resources | ||
|
||
* Installation with Docker [here](https://docs.gitea.com/installation/install-with-docker) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: "3" | ||
|
||
networks: | ||
gitea: | ||
external: false | ||
|
||
services: | ||
server: | ||
image: gitea/gitea:1.21.7 | ||
container_name: gitea | ||
environment: | ||
- USER_UID=1000 | ||
- USER_GID=1000 | ||
restart: always | ||
networks: | ||
- gitea | ||
volumes: | ||
- ./gitea:/data | ||
- /etc/timezone:/etc/timezone:ro | ||
- /etc/localtime:/etc/localtime:ro | ||
ports: | ||
- "3000:3000" | ||
- "222:22" |