Integracion completa de las migraciones

This commit is contained in:
2026-02-23 12:04:21 +01:00
parent 12dae135b5
commit fc319372be
9 changed files with 300 additions and 183 deletions

View File

@@ -2,7 +2,6 @@
-- PostgreSQL database dump
--
\restrict 8rNdhulAsfz5yOkZrPZ5f3riDYVBHnFPTcb2MraxKbPVyPsdTm81R2jsJppwk7u
-- Dumped from database version 16.11 (Ubuntu 16.11-0ubuntu0.24.04.1)
-- Dumped by pg_dump version 16.11 (Ubuntu 16.11-0ubuntu0.24.04.1)
@@ -288,5 +287,4 @@ ALTER TABLE ONLY public.order_history
-- PostgreSQL database dump complete
--
\unrestrict 8rNdhulAsfz5yOkZrPZ5f3riDYVBHnFPTcb2MraxKbPVyPsdTm81R2jsJppwk7u

View File

@@ -1,5 +1,6 @@
# --- Release image ---
FROM node:22-alpine AS release
RUN apk --no-cache add git
WORKDIR /home/node/app
RUN corepack enable

View File

@@ -1,5 +1,8 @@
# Stage base para coordinar las fases de build y ejecucion
FROM node:22-alpine AS base
# Hace falta para la herramienta de migraciones, cuando se publique se
# sustituira por el paquete de npm
RUN apk --no-cache add git
WORKDIR /usr/local/app
RUN corepack enable && \
corepack prepare yarn@4.12.0 --activate
@@ -12,7 +15,8 @@ COPY tsconfig*.json ./
COPY .env* ./
COPY ./.yarnrc.yml ./
COPY ./deployment/local/docker/start.sh ./
# Copiar el archivo de migrations? porque ahora no creo que se esté lanzando nada
COPY ./deployment/database/migrations ./deployment/database/migrations
RUN yarn install && \
yarn cache clean && \
yarn build && \

View File

@@ -66,7 +66,7 @@ services:
env_file:
- .env
ports:
- "5432:${DEV_POSTGRES_PORT}"
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
volumes:
- ./sql-data/:/var/lib/postgres/data
- ./deployment/database/init.sql:/docker-entrypoint-initdb.d/init.sql