This commit is contained in:
leo 2024-08-08 06:00:37 +05:00
parent 174b09284e
commit f3306a51a7
2 changed files with 33 additions and 24 deletions

View File

@ -1,2 +1,10 @@
### Gitea
*docker configuration*
Preparation:
`sudo bash /data/utils/init-db.sh gitea GITEA_DB_PASSWORD`
Start: `sudo docker start gitea`
Start `sudo docker compose -f /data/gitea/docker-compose.yml up -d`
Stop: `sudo docker stop gitea`

View File

@ -3,30 +3,31 @@ services:
image: gitea/gitea:1.22.0
container_name: gitea
env_file:
- ./secrets/vars.env
- /data/secrets/${SERVER_DOMAIN}/${SERVER_DOMAIN}.env
environment:
- APP_NAME="Gitea"
- USER_UID=1000
- USER_GID=1000
- USER=git
- RUN_MODE=prod
- DOMAIN=git.${DOMAIN}
APP_NAME: "Gitea"
USER_UID: 1000
USER_GID: 1000
USER: git
RUN_MODE: prod
DOMAIN: git.${SERVER_DOMAIN}
ROOT_URL: https://git.${SERVER_DOMAIN}
HTTP_PORT: 3000
- SSH_DOMAIN=git.${DOMAIN}
- HTTP_PORT=3000
- ROOT_URL=https://git.${DOMAIN}
- SSH_PORT=222
- SSH_LISTEN_PORT=22
- GITEA__cache__ENABLED=true
- GITEA__cache__ADAPTER=redis
- GITEA__cache__HOST=redis://gitea-cache:6379/0?pool_size=100&idle_timeout=180s
- GITEA__cache__ITEM_TTL=24h
SSH_PORT: 222
SSH_LISTEN_PORT: 22
SSH_DOMAIN: git.${SERVER_DOMAIN}
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=postgres:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=${GITEA_DB_PW}
GITEA__cache__ENABLED: true
GITEA__cache__ADAPTER: redis
GITEA__cache__HOST: redis://gitea-cache:6379/0?pool_size=100&idle_timeout=180s
GITEA__cache__ITEM_TTL: 24
GITEA__database__DB_TYPE: postgres
GITEA__database__HOST: postgres:5432
GITEA__database__NAME: gitea
GITEA__database__USER: gitea
GITEA__security__INSTALL_LOCK: true
restart: always
networks:
- proxynet
@ -35,7 +36,7 @@ services:
condition: service_started
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`git.${DOMAIN}`)"
- "traefik.http.routers.gitea.rule=Host(`git.${SERVER_DOMAIN}`)"
- "traefik.http.routers.gitea.entrypoints=https"
- "traefik.http.routers.gitea.service=gitea-service"
- "traefik.http.services.gitea-service.loadbalancer.server.port=3000"