Skip to content

Commit 329cb38

Browse files
committed
Fix CodeBuild scripts upload
1 parent 7cb620d commit 329cb38

3 files changed

Lines changed: 556 additions & 3 deletions

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ COPY --from=builder /build/node_modules/.prisma /app/node_modules/.prisma
4242
# Copy prisma migrations
4343
COPY --from=builder /build/src/lib/prisma/migrations /app/node_modules/.prisma/client/migrations
4444

45+
# Copy CodeBuild scripts
46+
COPY --from=builder /build/scripts /app/scripts
47+
COPY --from=builder /build/preview /app/preview
48+
4549
EXPOSE 8443
4650
ENV PORT=8443
4751
CMD ["sh", "-c", "npx prisma migrate deploy --schema=./node_modules/.prisma/client/schema.prisma && node --enable-source-maps index.js"]

preview/playlisting/index.html

Lines changed: 548 additions & 0 deletions
Large diffs are not rendered by default.

src/lib/server/job-executors/s3.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Job } from 'bullmq';
22
import { readFile } from 'node:fs/promises';
3+
import { join } from 'node:path';
34
import { S3 } from '$lib/server/aws/s3';
45
import type { BullMQ } from '$lib/server/bullmq';
56
import type { BuildForPrefix } from '$lib/server/models/artifacts';
@@ -39,9 +40,9 @@ export async function save(job: Job<BullMQ.S3.CopyArtifacts>): Promise<unknown>
3940
const manifestFiles = manifestFileContent.split('\n');
4041
if (manifestFiles.length > 0) {
4142
// Copy index.html to destination folder
42-
const path = './preview/playlisting/index.html';
43-
44-
const indexContents = (await readFile(path)).toString();
43+
const indexContents = (
44+
await readFile(join(process.cwd(), './preview/playlisting/index.html'))
45+
).toString();
4546
await s3.writeFileToS3(indexContents, 'play-listing/index.html', build);
4647
}
4748
if (!defaultLanguage) {

0 commit comments

Comments
 (0)