refactor: migrar GitLab → Gitea (aulas 10, 11, 13)
- 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
This commit is contained in:
51
aula-13/images/postgresql/Dockerfile
Normal file
51
aula-13/images/postgresql/Dockerfile
Normal file
@@ -0,0 +1,51 @@
|
||||
# =============================================================================
|
||||
# Dockerfile - PostgreSQL Production (Alpine)
|
||||
# =============================================================================
|
||||
#
|
||||
# Imagem customizada PostgreSQL para substituir Bitnami.
|
||||
# Otimizada para produção e formato eStargz (lazy pulling).
|
||||
#
|
||||
# Build (formato eStargz):
|
||||
# docker buildx build \
|
||||
# --output type=image,name=registry.kube.quest/factory/postgresql:17,push=true,compression=estargz,force-compression=true,oci-mediatypes=true \
|
||||
# .
|
||||
#
|
||||
# =============================================================================
|
||||
|
||||
FROM postgres:17-alpine
|
||||
|
||||
LABEL maintainer="workshop"
|
||||
LABEL description="PostgreSQL 17 Alpine - Production Ready"
|
||||
LABEL org.opencontainers.image.title="postgresql"
|
||||
LABEL org.opencontainers.image.version="17"
|
||||
|
||||
# Variáveis de ambiente padrão
|
||||
ENV POSTGRES_USER=postgres \
|
||||
POSTGRES_DB=postgres \
|
||||
PGDATA=/var/lib/postgresql/data/pgdata \
|
||||
LANG=en_US.UTF-8
|
||||
|
||||
# Instalar dependências adicionais úteis
|
||||
RUN apk add --no-cache \
|
||||
tzdata \
|
||||
curl \
|
||||
jq
|
||||
|
||||
# Criar diretório para configurações customizadas
|
||||
RUN mkdir -p /etc/postgresql/postgresql.conf.d
|
||||
|
||||
# Copiar configuração de produção
|
||||
COPY postgresql.conf /etc/postgresql/postgresql.conf.d/00-production.conf
|
||||
|
||||
# Healthcheck nativo
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
||||
CMD pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB} || exit 1
|
||||
|
||||
# Expor porta padrão
|
||||
EXPOSE 5432
|
||||
|
||||
# Usuário não-root (já vem configurado na imagem oficial)
|
||||
USER postgres
|
||||
|
||||
# Comando padrão com configuração customizada
|
||||
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf.d/00-production.conf"]
|
||||
Reference in New Issue
Block a user