1
0
mirror of https://github.com/tommytran732/Gitea-Docker-Compose synced 2024-11-13 22:41:33 -05:00
Gitea-Docker-Compose/docker-compose.yml

81 lines
1.6 KiB
YAML
Raw Normal View History

version: "3"
services:
gitea:
# You can use gitea/gitea:latest-rootless, but it tends to be behind gitea:latest for some reason :/
2023-08-15 20:30:39 -04:00
image: gitea/gitea:latest-rootless
container_name: gitea
restart: unless-stopped
volumes:
- gitea-data:/var/lib/gitea
- gitea-config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "2222:2222"
depends_on:
- mariadb
networks:
- gitea
- mariadb
read_only: true
user: "1000:1000"
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
mariadb:
image: mariadb:latest
container_name: mariadb
restart: unless-stopped
environment:
2022-11-23 08:53:59 -05:00
- MYSQL_ROOT_PASSWORD=changeme
- MYSQL_USER=gitea
- MYSQL_PASSWORD=changeme
- MYSQL_DATABASE=gitea
volumes:
- mariadb:/var/lib/mysql
networks:
- mariadb
user: "999:999"
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
swag:
image: ghcr.io/linuxserver/swag
container_name: swag
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- URL=yourdomain.tld
- SUBDOMAINS=git
- VALIDATION=http
- EMAIL=changeme@yourdomain.tld
- ONLY_SUBDOMAINS=true
volumes:
- ./swag:/config:Z
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- 443:443
- 80:80
networks:
- gitea
security_opt:
- no-new-privileges:true
2022-11-30 04:02:48 -05:00
cap_add:
- NET_ADMIN
networks:
gitea:
mariadb:
volumes:
gitea-data:
gitea-config:
mariadb: