Base + compilacion simple
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
# Stage base para coordinar las fases de build y ejecucion
|
||||
FROM node:22-alpine AS base
|
||||
FROM node:22-alpine
|
||||
# Hace falta para la herramienta de migraciones, cuando se publique se
|
||||
# sustituira por el paquete de npm
|
||||
RUN apk --no-cache add git=latest
|
||||
WORKDIR /usr/local/app
|
||||
|
||||
COPY ./package.json ./package.lock ./
|
||||
#RUN apk --no-cache add git
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./package.json ./package-lock.json ./
|
||||
COPY ./src ./src
|
||||
# copia el codigo en general
|
||||
COPY tsconfig*.json ./
|
||||
COPY tsconfig.json ./
|
||||
COPY .env* ./
|
||||
COPY ./.yarnrc.yml ./
|
||||
COPY ./deployment/local/docker/start.sh ./
|
||||
COPY ./deployment/local/start.sh ./
|
||||
# Copiar el archivo de migrations? porque ahora no creo que se esté lanzando nada
|
||||
COPY ./deployment/database/migrations ./deployment/database/migrations
|
||||
RUN npm install --production && \
|
||||
npm build && \
|
||||
chmod +x start.sh
|
||||
|
||||
RUN npm config set registry https://git.savefamilygps.net/api/packages/SaveFamily/npm/ &&\
|
||||
echo "registry=https://registry.npmjs.org/" >> .npmrc &&\
|
||||
npm install &&\
|
||||
ls && npm run build &&\
|
||||
chmod +x start.sh
|
||||
EXPOSE ${PORT}
|
||||
ENTRYPOINT [ "./start.sh" ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user