This commit is contained in:
MYSTYX7
2023-12-04 16:28:16 +05:30
5 changed files with 25 additions and 8 deletions

View File

@ -43,6 +43,7 @@ It should take just under half a minute for all the services to be booted up cor
### 5. Run the development server
```sh
pnpm prisma:migrate:dev
pnpm dev
```

View File

@ -8,7 +8,7 @@ msgstr ""
"Language: el\n"
"Project-Id-Version: reactive-resume\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-26 14:53\n"
"PO-Revision-Date: 2023-12-04 00:08\n"
"Last-Translator: \n"
"Language-Team: Greek\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@ -240,7 +240,7 @@ msgstr ""
#: apps/client/src/pages/dashboard/resumes/_dialogs/resume.tsx:155
#: apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx:135
msgid "Cancel"
msgstr ""
msgstr "Ακύρωση"
#: apps/client/src/components/ai-actions.tsx:103
#: apps/client/src/components/ai-actions.tsx:106
@ -308,7 +308,7 @@ msgstr ""
#: apps/client/src/pages/builder/sidebars/left/sections/shared/section-list-item.tsx:94
msgid "Copy"
msgstr ""
msgstr "Αντιγραφή"
#: apps/client/src/pages/builder/_components/toolbar.tsx:132
msgid "Copy Link to Resume"
@ -321,16 +321,16 @@ msgstr ""
#: apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx:158
#: apps/client/src/pages/dashboard/resumes/_dialogs/resume.tsx:243
msgid "Create"
msgstr ""
msgstr "Δημιουργία"
#: apps/client/src/pages/auth/register/page.tsx:67
#: apps/client/src/pages/auth/register/page.tsx:72
msgid "Create a new account"
msgstr ""
msgstr "Δημιουργία νέου λογαριασμού"
#: apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx:146
msgid "Create a new item"
msgstr ""
msgstr "Δημιουργία νέου στοιχείου"
#: apps/client/src/pages/dashboard/resumes/_dialogs/resume.tsx:177
#: apps/client/src/pages/dashboard/resumes/_layouts/grid/_components/create-card.tsx:24

View File

@ -8,7 +8,7 @@ msgstr ""
"Language: zh\n"
"Project-Id-Version: reactive-resume\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-28 00:08\n"
"PO-Revision-Date: 2023-12-02 00:07\n"
"Last-Translator: \n"
"Language-Team: Chinese Simplified\n"
"Plural-Forms: nplurals=1; plural=0;\n"
@ -24,7 +24,7 @@ msgstr "您已成功启用双重身份验证。"
#: apps/client/src/pages/home/sections/features/index.tsx:57
msgid "{templatesCount} resume templates to choose from"
msgstr "{templatesCount} 简历模板可供选择"
msgstr "{templatesCount} 简历模板可供选择"
#: apps/client/src/pages/builder/sidebars/left/sections/shared/section-options.tsx:114
msgid "{value, plural, one {Column} other {Columns}}"

View File

@ -39,6 +39,10 @@ export const configSchema = z.object({
.string()
.default("false")
.transform((s) => s !== "false" && s !== "0"),
STORAGE_SKIP_CREATE_BUCKET: z
.string()
.default("false")
.transform((s) => s !== "false" && s !== "0"),
// Redis
REDIS_URL: z.string().url().startsWith("redis://").optional(),

View File

@ -44,6 +44,8 @@ export class StorageService implements OnModuleInit {
private client: Client;
private bucketName: string;
private skipCreateBucket: boolean;
constructor(
private readonly configService: ConfigService<Config>,
private readonly minioService: MinioService,
@ -55,6 +57,16 @@ export class StorageService implements OnModuleInit {
async onModuleInit() {
this.client = this.minioService.client;
this.bucketName = this.configService.getOrThrow<string>("STORAGE_BUCKET");
this.skipCreateBucket = this.configService.getOrThrow<boolean>("STORAGE_SKIP_CREATE_BUCKET");
if (this.skipCreateBucket) {
this.logger.log("Skipping the creation of the storage bucket.");
this.logger.warn("Make sure that the following paths are publicly accessible: ");
this.logger.warn("- /pictures/*");
this.logger.warn("- /previews/*");
this.logger.warn("- /resumes/*");
return;
}
try {
// Create a storage bucket if it doesn't exist