From 0cc49e36755d0ee8f961f46eb83775d98bda87ab Mon Sep 17 00:00:00 2001 From: wenyongda Date: Sat, 10 May 2025 16:53:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_posts/Docker-Compose.md | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/source/_posts/Docker-Compose.md b/source/_posts/Docker-Compose.md index 9f727d5..553059b 100644 --- a/source/_posts/Docker-Compose.md +++ b/source/_posts/Docker-Compose.md @@ -261,3 +261,39 @@ networks: external: true ``` +# 容器搭建 + +## Gitea + +docker-compose.yaml + +```yaml +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:1.23 + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - DB_TYPE=mysql + - DB_HOST=:33061 + - DB_NAME=gitea + - DB_USER=gitea + - DB_PASSWD=Wyd210213 + restart: always + networks: + - gitea + volumes: + - /usr/local/docker/gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" + +``` +