[repository]๊ธฐํ‹ฐ / Gitea

๐Ÿ‘‰๐Ÿป Git ๊ธฐ๋ฐ˜์œผ๋กœ ์†Œ์Šค์ฝ”๋“œ๋ฅผ ๊ฐ€๋ณ๊ฒŒ ๊ด€๋ฆฌ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
You can manage source code lightweightly using Git.

๐Ÿ‘‰๐Ÿป ์‚ฌ์šฉ๋ฐฉ๋ฒ•์€ ๊นƒํ—ˆ๋ธŒ์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.
The usage is the same as on GitHub.

๐Ÿ‘‰๐Ÿป ์•„๋ž˜์˜ ๋ชจ๋“  ์„ค์น˜๊ณผ์ •์€ xubuntu์—์„œ ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.
All installation steps below were performed on Xubuntu.

๐Ÿ“ ์„ค์น˜ / install

โœ”๏ธ ๋„์ปค์™€ ๋„์ปค ์ปดํฌ์ฆˆ๊ฐ€ ์—†๋‹ค๋ฉด ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
If you do not have Docker and Docker Compose installed, install them.

sudo apt update
sudo apt install docker.io docker-compose-v2 -y

โœ”๏ธ ํŒŒ์ผ์ž‘์„ฑ
File Creation

mkdir ~/gitea && cd ~/gitea
nano docker-compose.yml

— docker-compose.yaml

version: "3"

networks:
  gitea:
    external: false

services:
  server:
    image: gitea/gitea:latest
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - gitea
    volumes:
      - ./data:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3000:3000"
      - "2222:22"

โœ”๏ธ ๋„์ปค ์ปดํฌ์ฆˆ ์‹คํ–‰
Run Docker Compose

sudo docker compose up -d

ย โœ”๏ธ http://localhost:3000 ์œผ๋กœ ์ ‘์†
Access http://localhost:3000

— ๊ธฐ๋ณธ ๊ฐ’์œผ๋กœ ๋‘๊ณ  Gitea ์„ค์น˜ํ•˜๊ธฐ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
Leave the settings at their default values โ€‹โ€‹and click the “Install Gitea” button.

— ํšŒ์›๊ฐ€์ž…๊นŒ์ง€ ์™„๋ฃŒํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ํ™”๋ฉด์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
Once you complete the sign-up process, you will see a screen like the following.

— ์šฐ์ธก์˜ +๋ฅผ ๋ˆŒ๋Ÿฌ์„œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ์ฝ”๋“œ๋ฅผ ์—…๋กœ๋“œํ•ด๋ด…๋‹ˆ๋‹ค.
Click the “+” on the right to add a repository and upload your code.

touch README.md
git init
git checkout -b main
git add README.md
git commit -m "first commit"
git remote add origin http://192.168.0.101:5080/team-gideon/flm-nextjs.git
git push -u origin main

— ์ฝ”๋“œ๊ฐ€ ์—…๋กœ๋“œ๋œ ํ™”๋ฉด์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
You can see the screen where the code has been uploaded.

gitea

๐Ÿ“๋‚˜์ค‘์— gitea๋ฅผ ์ด์ „ํ•˜๊ฑฐ๋‚˜ ๋ฐฑ์—…ํ•  ๊ฒฝ์šฐ ๋„์ปค ์ปดํฌ์ฆˆ yamlํŒŒ์ผ์ด ์žˆ๋Š” gitea๋””๋ ‰ํ† ๋ฆฌ๋งŒ ๋ฐฑ์—…ํ•ด์„œ ์˜ฎ๊ธฐ๋ฉด๋ฉ๋‹ˆ๋‹ค.
If you need to migrate or back up Gitea later, you simply need to back up and move the Gitea directory containing the Docker Compose YAML file.

Leave a Reply