Move migrations to separate app
This commit is contained in:
parent
87724bb7b8
commit
c47223f5e9
21 changed files with 55 additions and 815 deletions
|
|
@ -6,7 +6,7 @@ RUN mkdir -p ${APP_DIR}/
|
|||
RUN npm i -g turbo
|
||||
WORKDIR ${APP_DIR}
|
||||
COPY . .
|
||||
RUN turbo prune --scope=@link-stack/link --docker
|
||||
RUN turbo prune --scope=@link-stack/link --scope=@link-stack/bridge-migrations --docker
|
||||
|
||||
FROM base AS installer
|
||||
ARG APP_DIR=/opt/link
|
||||
|
|
@ -18,7 +18,7 @@ RUN npm ci
|
|||
|
||||
COPY --from=builder ${APP_DIR}/out/full/ .
|
||||
RUN npm i -g turbo
|
||||
RUN turbo run build --filter=@link-stack/link
|
||||
RUN turbo run build --filter=@link-stack/link --filter=@link-stack/bridge-migrations
|
||||
|
||||
FROM base AS runner
|
||||
ARG APP_DIR=/opt/link
|
||||
|
|
@ -39,6 +39,7 @@ USER node
|
|||
WORKDIR ${APP_DIR}
|
||||
COPY --from=installer ${APP_DIR}/node_modules/ ./node_modules/
|
||||
COPY --from=installer ${APP_DIR}/apps/link/ ./apps/link/
|
||||
COPY --from=installer ${APP_DIR}/apps/bridge-migrations/ ./apps/bridge-migrations/
|
||||
COPY --from=installer ${APP_DIR}/package.json ./package.json
|
||||
USER root
|
||||
WORKDIR ${APP_DIR}/apps/link/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
echo "running migrations"
|
||||
(cd ../bridge-migrations/ && npm run migrate:up:all)
|
||||
echo "starting link"
|
||||
exec dumb-init npm run start
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue