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

rip out gcreds #1885

Merged
merged 8 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: set up google creds
env:
DATA: ${{ secrets.JIGSAW_SERVICE_ACCT }}
run: |
echo $DATA > server/llm-service-account.json

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and start Docker containers
env:
JIGSAW_SERVICE_ACCT: ${{ secrets.JIGSAW_SERVICE_ACCT }}
run: |
docker compose -f docker-compose.yml -f docker-compose.test.yml --env-file test.env --profile postgres up -d --build

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ prod.env
xids.csv
preprod.env
.venv
server/llm-service-account.json
1 change: 0 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ services:
target: dev
args:
NODE_ENV: development
GOOGLE_APPLICATION_CREDENTIALS: /app/llm-service-account.json
volumes:
# This will mount your local polis/server directory so changes can be watched and reloaded.
# But it will ignore your local node_modules and instead use a new container volume.
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ services:
target: prod
args:
NODE_ENV: production
JIGSAW_SERVICE_ACCT: ${JIGSAW_SERVICE_ACCT}
labels:
polis_tag: ${TAG:-dev}
depends_on:
Expand Down
1 change: 0 additions & 1 deletion example.env
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ AWS_SECRET_ACCESS_KEY=
# This value is written by the server app if SHOULD_USE_TRANSLATION_API is true.
GOOGLE_APPLICATION_CREDENTIALS=
GOOGLE_JIGSAW_PERSPECTIVE_API_KEY=
JIGSAW_SERVICE_ACCT=

# A value in miliseconds for caching AI responses for narrativeReport
MAX_REPORT_CACHE_DURATION=
Expand Down
6 changes: 0 additions & 6 deletions heroku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ build:
worker: math/Dockerfile
# build and release static assets (js, index.html, etc)
#release: Dockerfile
# release:
# image: web
# command:
# - echo "provisioning gcloud" # You can add other release commands if needed
# - printf "%s" "$JIGSAW_SERVICE_ACCT" > /app/llm-service-account.json
# - gcloud auth activate-service-account --key-file=/app/llm-service-account.json
#release:
#image: release
#command:
Expand Down
16 changes: 0 additions & 16 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ WORKDIR /app
# Install Python and necessary tools (including pip)
RUN apk add --no-cache python3 py3-pip

# Install the gcloud CLI
RUN apk add --no-cache wget gnupg && \
wget -q -O - https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz | tar xvz -C /root && \
/root/google-cloud-sdk/install.sh --quiet

ENV PATH="/root/google-cloud-sdk/bin:${PATH}"

# This package is needed at runtime
RUN apk add libpq-dev

Expand Down Expand Up @@ -54,15 +47,6 @@ FROM base as prod
# Set default NODE_ENV to production unless overridden at build time with --build-arg NODE_ENV=development
ENV NODE_ENV ${NODE_ENV:-production}

# ARG JIGSAW_SERVICE_ACCT
# ENV JIGSAW_SERVICE_ACCT=${JIGSAW_SERVICE_ACCT}
# RUN echo ${JIGSAW_SERVICE_ACCT} > /app/llm-service-account.json

# ENV GOOGLE_APPLICATION_CREDENTIALS=/app/llm-service-account.json

# Authenticate with the service account
# RUN gcloud auth activate-service-account --key-file=/app/llm-service-account.json

RUN npm ci --production=false

# For prod builds, to minimize the image size, remove the dependencies tagged with `--virtual .build` above.
Expand Down
Loading