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] Support DigitalOcean Spaces Storage #7705

Merged
merged 10 commits into from
Mar 27, 2024
6 changes: 2 additions & 4 deletions packages/common/src/interfaces/IDigitalOceanConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
export interface IDigitalOceanConfig {
/** DigitalOcean Access Key ID */
readonly accessKeyId: string;

/** DigitalOcean Secret Access Key */
readonly secretAccessKey: string;

/** DigitalOcean Region */
readonly region: string;

/** DigitalOcean Service URL */
readonly serviceUrl: string;

/** The CDN (Content Delivery Network) DigitalOcean configuration. */
readonly cdn?: string;
rahul-rocket marked this conversation as resolved.
Show resolved Hide resolved
/** S3 Bucket Configuration */
readonly s3: {
/** S3 Bucket Name */
Expand Down
1 change: 1 addition & 0 deletions packages/config/src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const environment: IEnvironment = {
secretAccessKey: process.env.DIGITALOCEAN_SECRET_ACCESS_KEY,
region: process.env.DIGITALOCEAN_REGION || 'us-east-1',
serviceUrl: process.env.DIGITALOCEAN_SERVICE_URL || 'https://gauzy.sfo2.digitaloceanspaces.com', // Find your endpoint in the control panel, under Settings. Prepend "https://".
cdn: process.env.DIGITALOCEAN_CDN_URL,
s3: {
bucket: process.env.DIGITALOCEAN_S3_BUCKET || 'gauzy',
forcePathStyle: process.env.DIGITALOCEAN_S3_FORCE_PATH_STYLE === 'true' || false // Configures to use subdomain/virtual calling format.
Expand Down
1 change: 1 addition & 0 deletions packages/config/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export const environment: IEnvironment = {
secretAccessKey: process.env.DIGITALOCEAN_SECRET_ACCESS_KEY,
region: process.env.DIGITALOCEAN_REGION || 'us-east-1',
serviceUrl: process.env.DIGITALOCEAN_SERVICE_URL || 'https://gauzy.sfo2.digitaloceanspaces.com', // Find your endpoint in the control panel, under Settings. Prepend "https://".
cdn: process.env.DIGITALOCEAN_CDN_URL,
s3: {
bucket: process.env.DIGITALOCEAN_S3_BUCKET || 'gauzy',
forcePathStyle: process.env.DIGITALOCEAN_S3_FORCE_PATH_STYLE === 'true' || false // Configures to use subdomain/virtual calling format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface IDigitalOceanProviderConfig {
digitalocean_secret_access_key: string; // AWS secret access key for DigitalOcean
digitalocean_default_region: string; // AWS default region for DigitalOcean
digitalocean_service_url: string; // AWS service URL for DigitalOcean
digitalocean_cdn_url: string; // AWS service CDN for DigitalOcean
digitalocean_s3_bucket: string; // AWS bucket name for DigitalOcean
digitalocean_s3_force_path_style: boolean; // Whether to force path style URLs for DigitalOcean objects
}
Expand All @@ -54,6 +55,7 @@ export class DigitalOceanS3Provider extends Provider<DigitalOceanS3Provider> {
digitalocean_secret_access_key: digitalOcean.secretAccessKey,
digitalocean_default_region: digitalOcean.region,
digitalocean_service_url: digitalOcean.serviceUrl,
digitalocean_cdn_url: digitalOcean.cdn,
digitalocean_s3_bucket: digitalOcean.s3.bucket,
digitalocean_s3_force_path_style: digitalOcean.s3.forcePathStyle,
};
Expand Down
Loading