HiPoweredAnsible/deploy/gitea/templates/docker-compose.yml.j2

47 lines
922 B
Django/Jinja

version: "3"
networks:
gitea:
external: false
volumes:
gitea:
driver: local
services:
server:
image: gitea/gitea:1.21.7
container_name: gitea
environment:
- GITEA__database__DB_TYPE=mysql
- GITEA__database__DB_HOST=db:3306
- GITEA__database__DB_NAME=gitea
- GITEA__database__DB_USER=gitea
- GITEA__database__DB_PASSWD=gitea
- GITEA__service__DISABLE_REGISTRATION=true
restart: always
networks:
- gitea
volumes:
- gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "2222: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