mirror of
https://github.com/jorenn92/Maintainerr.git
synced 2025-12-19 08:25:47 +01:00
fix: Correct path to database migrations (#2193)
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -6,10 +6,18 @@ FROM base AS builder
|
||||
WORKDIR /app
|
||||
|
||||
RUN yarn global add turbo@^2
|
||||
COPY . .
|
||||
|
||||
# Copy only files needed to resolve/install dependencies first (better Docker layer caching)
|
||||
COPY package.json yarn.lock .yarnrc.yml turbo.json ./
|
||||
COPY .yarn/releases ./.yarn/releases
|
||||
COPY apps/server/package.json ./apps/server/package.json
|
||||
COPY apps/ui/package.json ./apps/ui/package.json
|
||||
COPY packages/contracts/package.json ./packages/contracts/package.json
|
||||
|
||||
RUN yarn install --network-timeout 99999999
|
||||
RUN yarn cache clean
|
||||
|
||||
# Copy the rest of the repository after deps are installed
|
||||
COPY . .
|
||||
|
||||
RUN <<EOF cat >> ./apps/ui/.env
|
||||
VITE_BASE_PATH=/__PATH_PREFIX__
|
||||
|
||||
@@ -10,7 +10,7 @@ const ormConfig: TypeOrmModuleOptions = {
|
||||
subscribers: ['./**/*.subscriber{.ts,.js}'],
|
||||
migrations:
|
||||
process.env.NODE_ENV === 'production'
|
||||
? ['/opt/app/server/dist/database/migrations/**/*{.js,.ts}']
|
||||
? ['/opt/app/apps/server/dist/database/migrations/**/*{.js,.ts}']
|
||||
: ['./dist/database/migrations/**/*{.js,.ts}'],
|
||||
autoLoadEntities: true,
|
||||
migrationsRun: true,
|
||||
|
||||
Reference in New Issue
Block a user