docker compose yml and backup script done by crone

This commit is contained in:
root
2026-04-12 14:06:19 +00:00
parent adf4f4d12b
commit 052b2237a6
2 changed files with 80 additions and 0 deletions

61
docker-compose.yml Normal file
View File

@@ -0,0 +1,61 @@
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
restart: always
depends_on:
- db
environment:
- USER_UID=1000
- USER_GID=1000
# Database config
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=strongpassword
volumes:
- ./gitea:/data
ports:
- "3000:3000"
- "222:22"
networks:
- gitea
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
db:
image: mariadb:11
container_name: gitea-db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=rootstrongpassword
- MYSQL_DATABASE=gitea
- MYSQL_USER=gitea
- MYSQL_PASSWORD=strongpassword
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- ./mariadb:/var/lib/mysql
networks:
- gitea
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
gitea: