docker-compose/gitea.yaml

47 lines
1.1 KiB
YAML

version: "3"
networks:
gitea:
name: gitea-network
external: false
ipam:
config:
- subnet: <subnet>
cloudflare-tunnel:
external: true
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=<uid>
- USER_GID=<gid>
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=db:3306
- GITEA__database__NAME=<database name>
- GITEA__database__USER=<database user>
- GITEA__database__PASSWD=<database password>
restart: unless-stopped
networks:
gitea:
cloudflare-tunnel:
ipv4_address: <static ip>
volumes:
- <docker directory>/gitea/data:/data
ports:
- "3000:3000"
- "222:22"
depends_on:
- db
db:
image: mysql:8
container_name: gitea-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=<root password>
- MYSQL_USER=<database user>
- MYSQL_PASSWORD=<database password>
- MYSQL_DATABASE=<database name>
networks:
- gitea
volumes:
- <docker directory>/gitea/mysql:/var/lib/mysql