Add Docker compose file for Gitea
This commit is contained in:
parent
348addc6a9
commit
ccc05ee41b
47
gitea.yaml
Normal file
47
gitea.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
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:latest
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user