From 7490ee5b510a2c435e0b264ee2a7b8f0c7eeeea1 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Mon, 20 May 2019 20:36:31 +0200 Subject: [PATCH] Fix firefox running in Docker by setting /dev/shm size to 2gb --- docker-compose.travis.yml | 3 ++- docker-compose.yml | 3 ++- frontend/karma.conf.js | 2 +- frontend/package.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docker-compose.travis.yml b/docker-compose.travis.yml index eb45447f8..f10e176b7 100644 --- a/docker-compose.travis.yml +++ b/docker-compose.travis.yml @@ -1,4 +1,4 @@ -version: '3.3' +version: '3.5' services: photoprism: @@ -8,6 +8,7 @@ services: volumes: - "~/.cache/yarn:/root/.cache/yarn" - "~/.cache/go-mod:/go/pkg/mod" + shm_size: "2gb" environment: PHOTOPRISM_HTTP_HOST: "0.0.0.0" PHOTOPRISM_HTTP_PORT: 2342 diff --git a/docker-compose.yml b/docker-compose.yml index 544c87a0b..8b8c3c65f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.3' +version: '3.5' services: photoprism: @@ -11,6 +11,7 @@ services: - "4000:4000" # Database (MySQL compatible) volumes: - ".:/go/src/github.com/photoprism/photoprism" + shm_size: "2gb" environment: PHOTOPRISM_DEBUG: "true" PHOTOPRISM_SERVER_MODE: "debug" diff --git a/frontend/karma.conf.js b/frontend/karma.conf.js index 15a5653d5..de3f00f23 100644 --- a/frontend/karma.conf.js +++ b/frontend/karma.conf.js @@ -12,7 +12,7 @@ module.exports = (config) => { customLaunchers: { LocalChrome: { base: "ChromeHeadless", - flags: ["--disable-translate", "--disable-extensions", "--no-sandbox", "--disable-web-security"], + flags: ["--disable-translate", "--disable-extensions", "--no-sandbox", "--disable-web-security", "--disable-dev-shm-usage"], }, }, diff --git a/frontend/package.json b/frontend/package.json index a7caf8860..8f07e02cd 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,7 +10,7 @@ "lint": "eslint --cache src/ *.js", "fmt": "eslint --cache --fix src/ *.js", "test": "karma start", - "test-chromium": "testcafe chromium:headless -S -s tests/screenshots tests/acceptance", + "test-chromium": "testcafe \"chromium:headless --disable-dev-shm-usage\" -S -s tests/screenshots tests/acceptance", "test-firefox": "testcafe firefox:headless -S -s tests/screenshots tests/acceptance" }, "babel": {