Skip to content

Instantly share code, notes, and snippets.

View PedroMidueno's full-sized avatar
😎
Always learning...

Pedro Midueño PedroMidueno

😎
Always learning...
View GitHub Profile
@Klerith
Klerith / patrones-recursos.md
Created November 19, 2024 14:33
Recursos adicionales - Patrones de diseño
@Klerith
Klerith / instalaciones-nest-microservicios.md
Last active April 16, 2025 02:45
Instalaciones recomendadas para el curso de Microservicios con Nest
@Klerith
Klerith / programas.md
Created July 13, 2023 20:10
Programas para hacer diagramas entidad relación
@Klerith
Klerith / docker-compose.yml
Last active April 18, 2025 23:09
PostgreSQL + PgAdmin
version: '3'
services:
myDB:
image: postgres:15.3
container_name: my-database
restart: always
ports:
- 5432:5432
environment:
@Klerith
Klerith / instalaciones-database.md
Last active May 2, 2025 04:35
Instalaciones necesarias para el curso de base de datos
@Klerith
Klerith / tarea-pg-admin.md
Last active May 3, 2025 23:09
Tarea sobre PGAdmin y Postgres

Docker Hub images

Postgres

pgAdmin

1. Crear un volumen para almacenar la información de la base de datos

docker COMANDO CREAR postgres-db

2. Montar la imagen de postgres así

OJO: No hay puerto publicado -p, lo que hará imposible acceder a la base de datos con TablePlus

@Klerith
Klerith / password-property-dto.ts
Created July 16, 2022 16:32
Password validation - DTO
@IsString()
@MinLength(6)
@MaxLength(50)
@Matches(
/(?:(?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {
message: 'The password must have a Uppercase, lowercase letter and a number'
})
password: string;
@Klerith
Klerith / seed.ts
Created July 12, 2022 18:55
Nest-Teslo Seed
interface SeedProduct {
description: string;
images: string[];
stock: number;
price: number;
sizes: ValidSizes[];
slug: string;
tags: string[];
title: string;
type: ValidTypes;
@Klerith
Klerith / Dockerfile
Last active May 6, 2025 15:39
Preparar imagen de Docker - Node App
# Install dependencies only when needed
FROM node:18-alpine3.15 AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Build the app with cache dependencies
FROM node:18-alpine3.15 AS builder