- Aula 10: Gitea + Registry + Actions + Runner (substituiu GitLab) - gitea-values.yaml: PostgreSQL standalone, Valkey standalone, ~800Mi RAM - setup.sh/cleanup.sh: namespace gitea, Helm gitea-charts/gitea + actions - README.md: documentação completa com de→para (GitLab/Harbor/Tekton vs Gitea) - Aula 11: ArgoCD (GitOps) — removido GitLab Runner (runner vive na aula-10) - setup.sh: só ArgoCD, integração SSH com Gitea - node-bugado/.gitea/workflows/ci.yml: pipeline convertida - Aula 13: Container Factory — atualizado para Gitea - setup.sh/cleanup.sh: referências GitLab → Gitea - pipelines/postgresql/ci.yml: Gitea Actions workflow - README.md: conexão com act_runner explicada - CLAUDE.md: tabela de aulas atualizada
78 lines
2.8 KiB
Plaintext
78 lines
2.8 KiB
Plaintext
# =============================================================================
|
|
# PostgreSQL Production Configuration
|
|
# =============================================================================
|
|
# Otimizado para containers Kubernetes com ~1GB de memória
|
|
# Documentação: https://www.postgresql.org/docs/17/runtime-config.html
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Conexões
|
|
# -----------------------------------------------------------------------------
|
|
listen_addresses = '*'
|
|
max_connections = 100
|
|
superuser_reserved_connections = 3
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Memória (para container com 1GB)
|
|
# -----------------------------------------------------------------------------
|
|
# shared_buffers: ~25% da RAM disponível
|
|
shared_buffers = 256MB
|
|
|
|
# effective_cache_size: ~50% da RAM (estimativa para o planner)
|
|
effective_cache_size = 512MB
|
|
|
|
# work_mem: memória por operação de sort/hash (cuidado com max_connections)
|
|
work_mem = 8MB
|
|
|
|
# maintenance_work_mem: para VACUUM, CREATE INDEX, etc.
|
|
maintenance_work_mem = 64MB
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# WAL (Write-Ahead Logging)
|
|
# -----------------------------------------------------------------------------
|
|
wal_level = replica
|
|
max_wal_size = 1GB
|
|
min_wal_size = 80MB
|
|
checkpoint_completion_target = 0.9
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Query Planner
|
|
# -----------------------------------------------------------------------------
|
|
# random_page_cost: baixo para SSD (1.1) vs HDD (4.0)
|
|
random_page_cost = 1.1
|
|
|
|
# effective_io_concurrency: alto para SSD
|
|
effective_io_concurrency = 200
|
|
|
|
# default_statistics_target: mais estatísticas = melhores planos
|
|
default_statistics_target = 100
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Logging
|
|
# -----------------------------------------------------------------------------
|
|
# Log para stderr (compatível com kubectl logs)
|
|
log_destination = 'stderr'
|
|
logging_collector = off
|
|
|
|
# O que logar
|
|
log_statement = 'ddl'
|
|
log_min_duration_statement = 1000
|
|
|
|
# Formato do log
|
|
log_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h '
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Locale/Encoding
|
|
# -----------------------------------------------------------------------------
|
|
timezone = 'America/Sao_Paulo'
|
|
lc_messages = 'en_US.UTF-8'
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Performance
|
|
# -----------------------------------------------------------------------------
|
|
# JIT: desabilitar em containers pequenos (overhead de compilação)
|
|
jit = off
|
|
|
|
# Huge pages: requer configuração do host
|
|
huge_pages = off
|