diff --git a/poc/devops/gitea/.gitignore b/poc/devops/gitea/.gitignore new file mode 100644 index 0000000..fb11978 --- /dev/null +++ b/poc/devops/gitea/.gitignore @@ -0,0 +1,2 @@ +/data/ +/postgres/ diff --git a/poc/devops/gitea/README.md b/poc/devops/gitea/README.md new file mode 100644 index 0000000..2ce4049 --- /dev/null +++ b/poc/devops/gitea/README.md @@ -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) 파일을 수정 후 재기동 시 설정 적용 \ No newline at end of file diff --git a/poc/devops/gitea/docker-compose.yml b/poc/devops/gitea/docker-compose.yml new file mode 100644 index 0000000..b27a0a8 --- /dev/null +++ b/poc/devops/gitea/docker-compose.yml @@ -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 \ No newline at end of file