gitea/docker-compose.yml

57 lines
1.2 KiB
YAML

version: "2"
networks:
gitea_net:
driver: macvlan
ipam:
config:
- subnet: 192.168.222.0/23
# gateway: 192.168.222.254
services:
gitea:
image: gitea/gitea:latest
environment:
- APP_NAME='通技的 gitea 服务器'
# - RUN_MODE='prod'
# - SSH_DOMAIN='dgtongji.f3322.net'
# - SSH_PORT=22
# - HTTP_PORT=80
# - ROOT_URL=dgtongji.f3322.net
- USER_UID=2001
- USER_GID=100
- DB_TYPE=sqlite3
# - DB_TYPE=mysql
# - DB_HOST=db:3306
# - DB_NAME=gitea
# - DB_USER=root
# - DB_PASSWD=gitea894231
- TZ=Asia/Shanghai
restart: always
# network_mode: "bridge"
networks:
gitea_net:
ipv4_address: 192.168.222.130
volumes:
- ./data/gitea:/data
- /sharedfolders/git/gitea:/backup
ports:
- "3000:3000"
- "22:22"
# depends_on:
# - db
# db:
# image: mariadb:10
# restart: always
# environment:
# - MYSQL_ROOT_PASSWORD=gitea894231
# - MYSQL_USER=gitea
# - MYSQL_PASSWORD=gitea894231
# - MYSQL_DATABASE=gitea
# - TZ=Asia/Shanghai
# networks:
# - gitea
# volumes:
# - ./data/db:/var/lib/mysql