Skip to content

Commit

Permalink
feat(git): ✨ Add an example git server for some testing
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguest75 committed Mar 25, 2024
1 parent 4de90af commit dd06152
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions 36_git/selfhost/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gitea
38 changes: 38 additions & 0 deletions 36_git/selfhost/README.md
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)
23 changes: 23 additions & 0 deletions 36_git/selfhost/docker-compose.yaml
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"

0 comments on commit dd06152

Please sign in to comment.