gitea-搭建

建立docker处理文件,并后台运行

1
docker-compse -f 文件名 up -d

文件内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
version: "3"

networks:
gitea:
external: false

services:
server:
image: gitea/gitea:1.14.4
container_name: gitea
environment:
- USER_UID=1001
- USER_GID=1001
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=root
- GITEA__database__PASSWD=Ace6d990
restart: always
network_mode: bridge
volumes:
- /data/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3150:3000"
- "3022:22"