Actualizando configuracion de stacks

This commit is contained in:
2026-02-16 07:51:58 -03:00
parent e425b0c137
commit daccaf3819
49 changed files with 503 additions and 430 deletions

12
stacks/gitea/.env.example Normal file
View File

@@ -0,0 +1,12 @@
DATA_ROOT="./gitea"
USER_UID=1000
USER_GID=1000
GITEA_RUNNER_REGISTRATION_TOKEN=sercret
POSTGRES_PASSWORD=secret
POSTGRES_DB=gitea
POSTGRES_USER=gitea
INSTANCE_URL="https://gitea.skrd.fun"

View File

@@ -0,0 +1,31 @@
services:
gitea:
networks:
- internal
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.gitea-web.rule=Host(`git.skrd.fun`)"
- "traefik.http.routers.gitea-web.entrypoints=web"
- "traefik.http.routers.gitea-web.middlewares=redirect-to-https@file"
- "traefik.http.routers.gitea.rule=Host(`git.skrd.fun`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.middlewares=crowdsec@file"
- "traefik.http.routers.gitea.tls.certresolver=cf"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
runner:
networks:
- internal
gitea-db:
networks:
- internal
networks:
internal:
name: gitea
proxy:
name: traefik
external: true

38
stacks/gitea/compose.yml Normal file
View File

@@ -0,0 +1,38 @@
services:
gitea:
image: gitea/gitea:latest
restart: unless-stopped
environment:
USER_UID: ${USER_UID}
USER_GID: ${USER_GID}
volumes:
- ${DATA_ROOT}/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- gitea-db
runner:
image: gitea/act_runner:latest
restart: unless-stopped
environment:
CONFIG_FILE: /config/config.yaml
GITEA_INSTANCE_URL: "${INSTANCE_URL}"
GITEA_RUNNER_NAME: "gitea-runner-1"
GITEA_RUNNER_REGISTRATION_TOKEN: "${GITEA_RUNNER_REGISTRATION_TOKEN}"
volumes:
- ${DATA_ROOT}/runner/config:/config
- ${DATA_ROOT}/runner/data:/data
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- gitea
gitea-db:
image: postgres:16
restart: unless-stopped
volumes:
- ${DATA_ROOT}/db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"

View File

@@ -1,8 +0,0 @@
USER_UID=1000
USER_GID=1000
GITEA_RUNNER_REGISTRATION_TOKEN=secret
POSTGRES_PASSWORD=secret
POSTGRES_DB=gitea
POSTGRES_USER=gitea

View File

@@ -1,62 +0,0 @@
services:
gitea:
image: gitea/gitea:latest
restart: unless-stopped
environment:
USER_UID: ${USER_UID}
USER_GID: ${USER_GID}
networks:
- internal
- proxy
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.gitea-web.rule=Host(`git.skrd.fun`)"
- "traefik.http.routers.gitea-web.entrypoints=web"
- "traefik.http.routers.gitea-web.middlewares=redirect-to-https@file"
- "traefik.http.routers.gitea.rule=Host(`git.skrd.fun`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls.certresolver=cf"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
volumes:
- /srv/dev-disk-by-uuid-1582b800-1f82-407a-a3aa-3460b3390127/docker/gitea/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- gitea-db
runner:
image: gitea/act_runner:latest
restart: unless-stopped
environment:
CONFIG_FILE: /config/config.yaml
GITEA_INSTANCE_URL: "https://git.skrd.fun"
GITEA_RUNNER_NAME: "gitea-runner-1"
GITEA_RUNNER_REGISTRATION_TOKEN: "${GITEA_RUNNER_REGISTRATION_TOKEN}"
networks:
- internal
volumes:
- /srv/dev-disk-by-uuid-1582b800-1f82-407a-a3aa-3460b3390127/docker/gitea/runner/config:/config
- /srv/dev-disk-by-uuid-1582b800-1f82-407a-a3aa-3460b3390127/docker/gitea/runner/data:/data
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- gitea
gitea-db:
image: postgres:16
restart: unless-stopped
volumes:
- /srv/dev-disk-by-uuid-1582b800-1f82-407a-a3aa-3460b3390127/docker/gitea/db:/var/lib/postgresql/data
networks:
- internal
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
networks:
internal:
name: gitea
proxy:
name: traefik
external: true