Switched cli token to GOOGLE_APPLICATION_CREDENTIALS

This commit is contained in:
Carlos Mesquita
2024-09-04 11:55:58 +01:00
parent 7b5e10fd79
commit ab4db36445
2 changed files with 2 additions and 1 deletions

View File

@@ -6,6 +6,8 @@ FROM python:3.11-slim
# Allow statements and log messages to immediately appear in the logs # Allow statements and log messages to immediately appear in the logs
ENV PYTHONUNBUFFERED True ENV PYTHONUNBUFFERED True
ENV GOOGLE_APPLICATION_CREDENTIALS=/app/firebase-configs/encoach-staging.json
# Copy local code to the container image. # Copy local code to the container image.
ENV APP_HOME /app ENV APP_HOME /app
WORKDIR $APP_HOME WORKDIR $APP_HOME

View File

@@ -118,7 +118,6 @@ class BatchUsers:
f'--rounds={os.getenv("FIREBASE_SCRYPT_ROUNDS")} ' f'--rounds={os.getenv("FIREBASE_SCRYPT_ROUNDS")} '
f'--mem-cost={os.getenv("FIREBASE_SCRYPT_MEM_COST")} ' f'--mem-cost={os.getenv("FIREBASE_SCRYPT_MEM_COST")} '
f'--project={os.getenv("FIREBASE_PROJECT_ID")} ' f'--project={os.getenv("FIREBASE_PROJECT_ID")} '
f'--token={os.getenv("FIREBASE_CLI_TOKEN")}'
) )
result = subprocess.run(command, shell=True, cwd=directory, capture_output=True, text=True) result = subprocess.run(command, shell=True, cwd=directory, capture_output=True, text=True)