diff --git a/Dockerfile b/Dockerfile index 5f58437f1..e81ce5d4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 diff --git a/terraform/app.tf b/terraform/app.tf index a86319a0a..db17b0102 100644 --- a/terraform/app.tf +++ b/terraform/app.tf @@ -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" } ) }