gitea: PoC 등록

This commit is contained in:
geonhos 2024-05-28 10:56:31 +09:00
parent c140f8fffb
commit 4f9e7f7106
3 changed files with 63 additions and 0 deletions

2
poc/devops/gitea/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/data/
/postgres/

View File

@ -0,0 +1,19 @@
# Gitea with Docker
## Introduction
- Docker 를 이용한 설치형 Git Repository
## Execution
- 실행
```shell
$ docker-compose up -d
```
- 종료
```shell
$ docker-compose down -v
```
## Configuration
- 최초 docker compose 실행 시 volume mount 로 인한 기본 디렉토리 자동 생성
- 최초 사이트 접속 시 초기 설정 화면 노출로 기본 설정 가능
- [app.ini](./data/gitea/conf/app.ini) 파일을 수정 후 재기동 시 설정 적용

View File

@ -0,0 +1,42 @@
version: "3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:1.22.0
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gitea
restart: always
networks:
- gitea
volumes:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
depends_on:
- db
db:
image: postgres:14
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- ./postgres:/var/lib/postgresql/data