Skip to content

Commit

Permalink
Move Puppeteer environment variables into Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Nov 28, 2024
1 parent ffc7760 commit ef25a20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# production: runs the actual app

# Build builder image
# WHEN WE UPDATE THIS WE HAVE TO KEEP PUPPETEER IN SYNC WITH THE VERSION OF CHROMIUM THAT GETS INSTALLED
# WHEN WE UPDATE THIS WE HAVE TO KEEP PUPPETEER IN SYNC WITH THE VERSION OF CHROMIUM THAT GETS INSTALLED
# Get the version `apk list chromium` in the running image and then update package.json https://pptr.dev/chromium-support#
# This is used for rendering PDFs
FROM ruby:3.3.0-alpine as builder
Expand Down Expand Up @@ -70,6 +70,10 @@ WORKDIR /app
# Set Rails environment to production
ENV RAILS_ENV=production

# Configure Puppeteer for PDF generation
ENV GROVER_NO_SANDBOX=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

# Add the commit sha to the env
ARG GIT_SHA
ENV GIT_SHA=$GIT_SHA
Expand Down
2 changes: 0 additions & 2 deletions terraform/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ locals {
AZURE_STORAGE_ACCESS_KEY = azurerm_storage_account.allegations.primary_access_key,
AZURE_STORAGE_CONTAINER = azurerm_storage_container.uploads.name
REDIS_URL = "rediss://:${azurerm_redis_cache.redis.primary_access_key}@${azurerm_redis_cache.redis.hostname}:${azurerm_redis_cache.redis.ssl_port}/0"
GROVER_NO_SANDBOX = "true"
PUPPETEER_EXECUTABLE_PATH = "/usr/bin/chromium-browser"
}
)
}
Expand Down

0 comments on commit ef25a20

Please sign in to comment.