rename variables with S3_ (from AWS_)
This commit is contained in:
24
.env.sample
24
.env.sample
@@ -1,16 +1,18 @@
|
||||
|
||||
#AWS_ACCESS_KEY=???
|
||||
#AWS_BUCKET_NAME=giftsimagetest
|
||||
#AWS_ENDPOINT_SERVER=a2-west.americancloud.com
|
||||
#AWS_REGION=US
|
||||
#AWS_SECRET_KEY=???
|
||||
# These settings work for American Cloud.
|
||||
#S3_ACCESS_KEY=???
|
||||
#S3_BUCKET_NAME=giftsimagetest
|
||||
#S3_ENDPOINT_SERVER=a2-west.americancloud.com
|
||||
#S3_REGION=US
|
||||
#S3_SECRET_KEY=???
|
||||
#S3_SET_ACL=true
|
||||
AWS_ACCESS_KEY=???
|
||||
AWS_BUCKET_NAME=gifts-image-test
|
||||
AWS_ENDPOINT_SERVER=gifts-image-test.s3.amazonaws.com
|
||||
AWS_REGION=us-west-1
|
||||
AWS_SECRET_KEY=???
|
||||
#S3_SET_ACL=false
|
||||
# These settings work for AWS.
|
||||
S3_ACCESS_KEY=???
|
||||
S3_BUCKET_NAME=gifts-image-test
|
||||
S3_ENDPOINT_SERVER=gifts-image-test.s3.amazonaws.com
|
||||
S3_REGION=us-west-1
|
||||
S3_SECRET_KEY=???
|
||||
S3_SET_ACL=false
|
||||
|
||||
# needed to check limits
|
||||
#ENDORSER_API_URL=http://localhost:3000
|
||||
|
||||
10
server.js
10
server.js
@@ -19,7 +19,7 @@ app.use(cors());
|
||||
const port = process.env.PORT || 3001;
|
||||
// file name also referenced in flyway.conf and potentially in .env files or in environment variables
|
||||
const dbFile = process.env.SQLITE_FILE || './image-db.sqlite';
|
||||
const bucketName = process.env.AWS_BUCKET_NAME || 'gifts-image-test';
|
||||
const bucketName = process.env.S3_BUCKET_NAME || 'gifts-image-test';
|
||||
const imageServer = process.env.DOWNLOAD_IMAGE_SERVER || 'test-image.timesafari.app';
|
||||
|
||||
const ethrDidResolver = getResolver;
|
||||
@@ -41,12 +41,12 @@ const endorserApiUrl = process.env.ENDORSER_API_URL || 'https://test-api.endorse
|
||||
|
||||
// Configure AWS
|
||||
const s3Client = new S3Client({
|
||||
endpoint: 'https://' + process.env.AWS_ENDPOINT_SERVER,
|
||||
region: process.env.AWS_REGION,
|
||||
endpoint: 'https://' + process.env.S3_ENDPOINT_SERVER,
|
||||
region: process.env.S3_REGION,
|
||||
forcePathStyle: true,
|
||||
credentials: {
|
||||
accessKeyId: process.env.AWS_ACCESS_KEY,
|
||||
secretAccessKey: process.env.AWS_SECRET_KEY
|
||||
accessKeyId: process.env.S3_ACCESS_KEY,
|
||||
secretAccessKey: process.env.S3_SECRET_KEY
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user