2026-03-05 17:37:30 +01:00
|
|
|
# Stage base para coordinar las fases de build y ejecucion
|
2026-03-09 17:11:09 +01:00
|
|
|
FROM node:22-alpine
|
2026-04-13 14:59:33 +02:00
|
|
|
|
|
|
|
|
WORKDIR /home/node/app
|
2026-03-05 17:37:30 +01:00
|
|
|
|
2026-03-09 17:11:09 +01:00
|
|
|
COPY ./package.json ./package-lock.json ./
|
|
|
|
|
COPY ./src ./src
|
2026-03-05 17:37:30 +01:00
|
|
|
# copia el codigo en general
|
2026-03-09 17:11:09 +01:00
|
|
|
COPY tsconfig.json ./
|
2026-03-05 17:37:30 +01:00
|
|
|
COPY .env* ./
|
2026-03-09 17:11:09 +01:00
|
|
|
COPY ./deployment/local/start.sh ./
|
2026-03-05 17:37:30 +01:00
|
|
|
# Copiar el archivo de migrations? porque ahora no creo que se esté lanzando nada
|
|
|
|
|
COPY ./deployment/database/migrations ./deployment/database/migrations
|
2026-03-09 17:11:09 +01:00
|
|
|
|
|
|
|
|
RUN npm config set registry https://git.savefamilygps.net/api/packages/SaveFamily/npm/ &&\
|
|
|
|
|
echo "registry=https://registry.npmjs.org/" >> .npmrc &&\
|
|
|
|
|
npm install &&\
|
2026-03-09 17:23:13 +01:00
|
|
|
ls && npm run build:esbuild &&\
|
2026-03-09 17:11:09 +01:00
|
|
|
chmod +x start.sh
|
2026-03-05 17:37:30 +01:00
|
|
|
EXPOSE ${PORT}
|
|
|
|
|
ENTRYPOINT [ "./start.sh" ]
|
|
|
|
|
|