Skip to content

Commit 3984d62

Browse files
committed
fix(gcs): Use correct env variable for the gcs service account file path
1 parent 8d34bc9 commit 3984d62

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

rootfs/bin/create_bucket

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ if os.getenv('DATABASE_STORAGE') == "s3":
2828

2929
elif os.getenv('DATABASE_STORAGE') == "gcs":
3030
scopes = ['https://www.googleapis.com/auth/devstorage.full_control']
31-
credentials = ServiceAccountCredentials.from_json_keyfile_name(os.getenv('GS_APPLICATION_CREDS'), scopes=scopes)
32-
with open(os.getenv('GS_APPLICATION_CREDS')) as data_file:
31+
credentials = ServiceAccountCredentials.from_json_keyfile_name(os.getenv('GOOGLE_APPLICATION_CREDENTIALS'), scopes=scopes)
32+
with open(os.getenv('GOOGLE_APPLICATION_CREDENTIALS')) as data_file:
3333
data = json.load(data_file)
3434
conn = Client(credentials=credentials, project=data['project_id'])
3535
exists = True

rootfs/docker-entrypoint-initdb.d/001_setup_envdir.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ if [[ "$DATABASE_STORAGE" == "s3" || "$DATABASE_STORAGE" == "minio" ]]; then
2828
echo $AWS_REGION > AWS_REGION
2929
echo $BUCKET_NAME > BUCKET_NAME
3030
elif [ "$DATABASE_STORAGE" == "gcs" ]; then
31-
GS_APPLICATION_CREDS="/var/run/secrets/deis/objectstore/creds/key.json"
31+
GOOGLE_APPLICATION_CREDENTIALS="/var/run/secrets/deis/objectstore/creds/key.json"
3232
BUCKET_NAME=$(cat /var/run/secrets/deis/objectstore/creds/database-bucket)
3333
echo "gs://$BUCKET_NAME" > WALE_GS_PREFIX
34-
echo $GS_APPLICATION_CREDS > GS_APPLICATION_CREDS
34+
echo $GOOGLE_APPLICATION_CREDENTIALS > GOOGLE_APPLICATION_CREDENTIALS
3535
echo $BUCKET_NAME > BUCKET_NAME
3636
elif [ "$DATABASE_STORAGE" == "azure" ]; then
3737
WABS_ACCOUNT_NAME=$(cat /var/run/secrets/deis/objectstore/creds/accountname)

0 commit comments

Comments
 (0)