Skip to content

Commit

Permalink
feat: can specify S3 endpoint URL
Browse files Browse the repository at this point in the history
  • Loading branch information
birme committed Nov 17, 2024
1 parent 673b193 commit 139cc93
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
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

0 comments on commit 139cc93

Please sign in to comment.