From 3bec20fb6f72851201ff39281bb53acb7b9116d7 Mon Sep 17 00:00:00 2001 From: cauta Date: Tue, 9 Apr 2024 18:35:08 +0700 Subject: [PATCH] fix error missing resource in docker file --- app/apps/onebox/Dockerfile | 2 +- app/apps/onebox/src/modules/users/users.service.ts | 6 +++--- .../src => }/resources/email_template/forgot_password.html | 0 .../resources/email_template/reset_password_success.html | 0 .../onebox/src => }/resources/email_template/welcome.html | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename app/{apps/onebox/src => }/resources/email_template/forgot_password.html (100%) rename app/{apps/onebox/src => }/resources/email_template/reset_password_success.html (100%) rename app/{apps/onebox/src => }/resources/email_template/welcome.html (100%) diff --git a/app/apps/onebox/Dockerfile b/app/apps/onebox/Dockerfile index 68eb97f..915ac86 100644 --- a/app/apps/onebox/Dockerfile +++ b/app/apps/onebox/Dockerfile @@ -23,6 +23,6 @@ RUN yarn install --production COPY ./dist/apps/onebox ./dist/apps/onebox -# COPY --from=development /usr/src/app/dist ./dist +COPY ./resources ./resources CMD ["node", "dist/apps/onebox/main.js"] \ No newline at end of file diff --git a/app/apps/onebox/src/modules/users/users.service.ts b/app/apps/onebox/src/modules/users/users.service.ts index 2ff2828..0e2bec2 100644 --- a/app/apps/onebox/src/modules/users/users.service.ts +++ b/app/apps/onebox/src/modules/users/users.service.ts @@ -56,7 +56,7 @@ export class UsersService { }).save(); const linkLogin = `https://${process.env.WEB_DOMAIN}/login`; const emailBody = await renderTemplate( - 'apps/onebox/src/resources/email_template/welcome.html', + 'resources/email_template/welcome.html', { linkLogin, }, @@ -161,7 +161,7 @@ export class UsersService { ); const linkResetPassword = `https://${process.env.WEB_DOMAIN}/reset-password?token=${forgotPasswordToken}&email=${user.email}`; const emailBody = await renderTemplate( - 'apps/onebox/src/resources/email_template/forgot_password.html', + 'resources/email_template/forgot_password.html', { linkResetPassword, expire: new Date(forgotPasswordExpire).toUTCString(), @@ -209,7 +209,7 @@ export class UsersService { ); const linkLogin = `https://${process.env.WEB_DOMAIN}/login`; const emailBody = await renderTemplate( - 'apps/onebox/src/resources/email_template/reset_password_success.html', + 'resources/email_template/reset_password_success.html', { linkLogin, }, diff --git a/app/apps/onebox/src/resources/email_template/forgot_password.html b/app/resources/email_template/forgot_password.html similarity index 100% rename from app/apps/onebox/src/resources/email_template/forgot_password.html rename to app/resources/email_template/forgot_password.html diff --git a/app/apps/onebox/src/resources/email_template/reset_password_success.html b/app/resources/email_template/reset_password_success.html similarity index 100% rename from app/apps/onebox/src/resources/email_template/reset_password_success.html rename to app/resources/email_template/reset_password_success.html diff --git a/app/apps/onebox/src/resources/email_template/welcome.html b/app/resources/email_template/welcome.html similarity index 100% rename from app/apps/onebox/src/resources/email_template/welcome.html rename to app/resources/email_template/welcome.html