From 7ae225b1d6ab7f2379aebdfe869f0bd30c39d8ba Mon Sep 17 00:00:00 2001 From: Nulo Date: Wed, 24 Jan 2024 17:57:59 -0300 Subject: [PATCH] sitio: migrar al iniciar --- Dockerfile | 3 ++- sitio/src/{hooks.server.ts => migrate.js} | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename sitio/src/{hooks.server.ts => migrate.js} (100%) diff --git a/Dockerfile b/Dockerfile index 2e39841..bd074d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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", "."] \ No newline at end of file +CMD "node migrate.js && node ." \ No newline at end of file diff --git a/sitio/src/hooks.server.ts b/sitio/src/migrate.js similarity index 100% rename from sitio/src/hooks.server.ts rename to sitio/src/migrate.js