Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: can specify S3 endpoint URL #9

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ package the output of the transcoding job referenced by the message.
| `OSC_ACCESS_TOKEN` | Optional OSC access token for accessing Encore instance in OSC | |
| `AWS_ACCESS_KEY_ID` | Optional AWS access key id when `PACKAGE_OUTPUT_FOLDER` is an AWS S3 bucket | |
| `AWS_SECRET_ACCESS_KEY` | Optional AWS secret access key when `PACKAGE_OUTPUT_FOLDER` is an AWS S3 bucket | |
| `S3_ENDPOINT_URL` | Optional S3 Endpoint URL when `PACKAGE_OUTPUT_FOLDER` is an S3 bucket not on AWS |

##### Stream key templates

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"node": ">=18.15.0"
},
"dependencies": {
"@eyevinn/shaka-packager-s3": "^0.5.2",
"@eyevinn/shaka-packager-s3": "^0.6.0",
"@fastify/cors": "^8.2.0",
"@fastify/type-provider-typebox": "^2.4.0",
"@osaas/client-core": "^0.8.0",
Expand Down
4 changes: 3 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface PackagingConfig {
packageFormatOptions?: PackageFormatOptions;
streamKeysConfig: StreamKeyTemplates;
manifestNamesConfig: ManifestNameTemplates;
s3EndpointUrl?: string;
}

export const DEFAULT_OUTPUT_SUBFOLDER_TEMPLATE = '$INPUTNAME$/$JOBID$';
Expand Down Expand Up @@ -92,7 +93,8 @@ function readPackagingConfig(): PackagingConfig {
stagingDir: process.env.STAGING_DIR,
packageFormatOptions,
streamKeysConfig,
manifestNamesConfig
manifestNamesConfig,
s3EndpointUrl: process.env.S3_ENDPOINT_URL
};
}

Expand Down
1 change: 1 addition & 0 deletions src/encorePackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class EncorePackager {
const packageFormatOptions = this.getPackageFormatOptions(job);
await doPackage({
dest,
s3EndpointUrl: this.config.s3EndpointUrl,
inputs,
source: this.config.oscAccessToken ? new URL(jobUrl).origin : undefined,
serviceAccessToken,
Expand Down
Loading