Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkeksz committed Jan 9, 2024
1 parent 63f9099 commit f10153c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ POSTGRES_MIGRATIONS_RUN=false
# Default: 10
EMAIL_VERIFICATION_CODE_LIFETIME_MINUTES=10

# Description: Email verification code max attempts
# Description: Email verification code max attempts for last lifetime period
# Type: number
# Default: 3
EMAIL_VERIFICATION_CODE_MAX_SENDING_ATTEMPTS=3

# Description: Email verification code max input attempts
# Description: Email verification code max input attempts for last lifetime period
# Type: number
# Default: 3
EMAIL_VERIFICATION_CODE_MAX_INPUT_ATTEMPTS=3
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ WORKDIR /usr/src/app
# Copy the bundled code from the build stage to the production image
COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/dist ./dist
COPY --chown=node:node --from=build /usr/src/app/schema.gql ./schema.gql

USER node

CMD ["node", "dist/main.js"]
CMD ["node", "dist/src/main.js"]
3 changes: 2 additions & 1 deletion src/schema-generator.script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as fs from 'fs'
import {EmailVerificationResolver} from './email-verification/email-verification.resolver'
import {RefreshTokenResolver} from './refresh-token/refresh-token.resolver'
import {UnisenderResolver} from './unisender/unisender.resolver'
import * as path from 'path'

async function schemaGenerator(): Promise<void> {
const app = await NestFactory.create(GraphQLSchemaBuilderModule)
Expand All @@ -17,7 +18,7 @@ async function schemaGenerator(): Promise<void> {
UnisenderResolver,
])
const schemaString = printSchema(schema)
const schemaFilePath = 'schema.gql'
const schemaFilePath = path.join(__dirname, '../schema.gql')
fs.writeFileSync(schemaFilePath, schemaString)
}

Expand Down

0 comments on commit f10153c

Please sign in to comment.