Gitea docker-compose.yaml
docker-compose.yaml
version: "2"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- DB_TYPE=mysql
- DB_HOST=db:3306
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWD=gitea
restart: always
networks:
- gitea
volumes:
- ./gitea:/data
ports:
- "3000:3000"
- "222:22"
depends_on:
- db
db:
image: mysql:8
restart: always
environment:
- MYSQL_ROOT_PASSWORD=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=gitea
- MYSQL_DATABASE=gitea
networks:
- gitea
volumes:
- ./mysql:/var/lib/mysql
README.md
Gitea
=====
## Run
```sh
docker-compose up -d
```
## First configuration
1. Open `http://Real-IP-Address:3000` in web browser
2. Click `Login` or `Registry` button
3. Update settings:
a. SSH Server Domain: Real-IP-Address
b. SSH Port: 222
c. Gitea Base URL: http://Real-IP-Address:3000/
d. Administrator Account Settings: Create an administrator, and the email is MUST field too.
4. Click `Install Gitea`
_*If you missed step 3.d, you can click Register button to create the first account, this account will be an administrator.*_
## Stop
```sh
docker-compose down
```

浙公网安备 33010602011771号