This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- name: 'gcr.io/cloud-builders/docker' | |
entrypoint: 'bash' | |
args: | |
- -c | |
- | | |
docker build -t XXXXXX-docker.pkg.dev/project/image-registry/image-name -f dockerfile.prod --platform=linux/amd64 --build-arg ORDERS_DATABASE_URL=$$DATABASE_URL . | |
secretEnv: ['DATABASE_URL'] | |
- name: 'gcr.io/cloud-builders/docker' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- name: "gcr.io/cloud-builders/docker" | |
args: | |
[ | |
"build", | |
"-t", | |
"XXXXX-docker.pkg.dev/project-name/registry/image-name", | |
"-f", | |
"dockerfile.prod", | |
"--platform=linux/amd64", |
- Crear un nuevo repositorio en GitHub
- Clonar el repositorio en la máquina local
- Añadir el submodule, donde
repository_url
es la url del repositorio ydirectory_name
es el nombre de la carpeta donde quieres que se guarde el sub-módulo (no debe de existir en el proyecto)
git submodule add <repository_url> <directory_name>
- Añadir los cambios al repositorio (git add, git commit, git push)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
// Para archivos de declaraciones | |
"outDir": "dist", | |
"target": "ES2020", | |
"declaration": true, | |
"allowJs": true, | |
"emitDeclarationOnly": false, | |
"declarationMap": false, |
Documentación oficial sobre Jest
- Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
Más información - Docs Oficiales
- Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
- Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
NewerOlder