1
0
mirror of https://github.com/tommytran732/Gitea-Docker-Compose synced 2024-11-08 21:01:33 -05:00
Gitea-Docker-Compose/docker-compose.yml
Tommy 9b6030f2a6
Update docker-compose.yml
Signed-off-by: Tommy <contact@tommytran.io>
2022-11-24 22:37:51 -05:00

80 lines
1.6 KiB
YAML

version: "3"
services:
gitea:
# You can use gitea/gitea:latest-rootless, but it tends to be behind gitea:latest for some reason :/
image: gitea/gitea:dev-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:
- 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
cap_add:
- NET_ADMIN
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
restart: unless-stopped
networks:
gitea:
mariadb:
volumes:
gitea-data:
gitea-config:
mariadb: