Skip to content

Commit 439957d

Browse files
committed
Setter user-data dirs
1 parent 4524cb3 commit 439957d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ WORKDIR /app
77

88
ENV NODE_ENV=production
99
ENV PUPPETEER_CACHE_DIR=/app/puppeteer
10-
ENV PUPPETEER_TMP_DIR=/tmp
10+
ENV PUPPETEER_TMP_DIR=/tmp/.puppeteer
11+
ENV XDG_CONFIG_HOME=/tmp/.chromium
12+
ENV XDG_CACHE_HOME=/tmp/.chromium
1113

1214
COPY package*.json .env /app/
1315
COPY node_modules /app/node_modules/

server/src/routing/site.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const archiveConfigs: CmsArchiveSiteConfig[] = [
2020
export const setupCmsArchiveSites = async (expressApp: Express) => {
2121
const opensearchClent = new CmsArchiveOpenSearchClient();
2222
const htmlRenderer = await initAndGetRenderer(expressApp);
23-
const browser = await puppeteer.launch({ args: ['--no-sandbox'] });
23+
const browser = await puppeteer.launch({
24+
args: ['--no-sandbox', '--disable-setuid-sandbox', '--user-data-dir=/tmp/.chromium'],
25+
});
2426

2527
const sites = archiveConfigs.map((config) => {
2628
return new CmsArchiveSite({

0 commit comments

Comments
 (0)