sitio: migrar al iniciar

This commit is contained in:
Cat /dev/Nulo 2024-01-24 17:57:59 -03:00
parent 4f1ea65de0
commit 7ae225b1d6
2 changed files with 2 additions and 1 deletions

View file

@ -19,9 +19,10 @@ COPY --from=build /usr/src/app/sitio/package.json package.real.json
RUN sh -c 'echo {\"name\":\"sitio\",\"type\":\"module\",\"dependencies\":$(jq .dependencies < package.real.json)} > package.json' && npm install
COPY --from=build /usr/src/app/db-datos node_modules/db-datos
COPY --from=build /usr/src/app/sitio/build .
COPY --from=build /usr/src/app/sitio/src/migrate.js .
COPY --from=build /usr/src/app/db-datos/drizzle .
ENV DB_PATH=/db/db.db
EXPOSE 3000
CMD ["node", "."]
CMD "node migrate.js && node ."