Repository: deephaven/deephaven-plugins (language: python)

Issue:
Separate E2E compose to its own file
Separate the E2E related containers into its own Docker Compose, instead of the one at root, such that `docker compose up` only starts core.


Discussion / hints:

Fix patch:
diff --git a/docker-compose.yml b/docker-compose.yml
index 8b11f5448..f9bb922af 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,7 +2,6 @@ version: '3'
 
 services:
   deephaven-plugins:
-    container_name: deephaven-plugins
     build:
       dockerfile: ./Dockerfile
       pull: true
@@ -15,26 +14,3 @@ services:
       - ./tests/app.d:/app.d
     environment:
       - START_OPTS=-Xmx4g -DAuthHandlers=io.deephaven.auth.AnonymousAuthenticationHandler -Ddeephaven.console.type=python -Ddeephaven.application.dir=./app.d
-
-  e2e-tests:
-    build:
-      dockerfile: ./tests/Dockerfile
-    ports:
-      - '9323:9323'
-    ipc: host
-    volumes:
-      - ./tests:/work/tests
-      - ./test-results:/work/test-results
-      - ./playwright-report:/work/playwright-report
-    entrypoint: "npx playwright test --config=playwright-docker.config.ts"
-    depends_on:
-      deephaven-plugins:
-        condition: service_healthy
-
-  update-snapshots:
-    extends:
-      service: e2e-tests
-    entrypoint: 'npx playwright test --config=playwright-docker.config.ts --update-snapshots'
-    depends_on:
-      deephaven-plugins:
-        condition: service_healthy
diff --git a/tools/run_docker.sh b/tools/run_docker.sh
index d2f9ab056..f930b0295 100755
--- a/tools/run_docker.sh
+++ b/tools/run_docker.sh
@@ -5,13 +5,14 @@ pushd "$(dirname "$0")"
 
 # Start the containers
 if [[ -z "${CI}" ]]; then
-  docker compose run --service-ports --rm --build "$@"
+  docker compose -f ../tests/docker-compose.yml run --service-ports --rm --build "$@"
   exit_code=$?
-  docker compose down
+  docker compose -f ../tests/docker-compose.yml down
 else
-  docker compose run --service-ports --rm --build -e CI=true "$@"
+  docker compose -f ../tests/docker-compose.yml run --service-ports --rm --build -e CI=true "$@"
   exit_code=$?
-  docker compose stop deephaven-plugins
+  # stop instead of down to preserve container logs
+  docker compose -f ../tests/docker-compose.yml stop deephaven-plugins
 fi
 
 # Reset pwd


Test patch:
diff --git a/tests/Dockerfile b/tests/Dockerfile
index 00596c498..ce77733aa 100644
--- a/tests/Dockerfile
+++ b/tests/Dockerfile
@@ -1,6 +1,6 @@
 # syntax=docker/dockerfile:1
-# Dockerfile for updating the snapshots.
-# Expects to be run from the root of the web-client-ui repo
+
+# Dockerfile for running and updating snapshots locally and on CI
 FROM mcr.microsoft.com/playwright:v1.41.2-jammy AS playwright
 WORKDIR /work/
 
diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml
new file mode 100644
index 000000000..7d9f728f1
--- /dev/null
+++ b/tests/docker-compose.yml
@@ -0,0 +1,39 @@
+version: '3'
+
+services:
+  deephaven-plugins:
+    container_name: deephaven-plugins
+    build:
+      context: ../
+      dockerfile: ./Dockerfile
+    expose:
+      - 10000
+    volumes:
+      - ../docker/data/:/data
+      - ../tests/app.d:/app.d
+    environment:
+      - START_OPTS=-Xmx4g -DAuthHandlers=io.deephaven.auth.AnonymousAuthenticationHandler -Ddeephaven.console.type=python -Ddeephaven.application.dir=./app.d
+
+  e2e-tests:
+    build:
+      context: ../
+      dockerfile: ./tests/Dockerfile
+    ports:
+      - '9323:9323'
+    ipc: host
+    volumes:
+      - ../tests:/work/tests
+      - ../test-results:/work/test-results
+      - ../playwright-report:/work/playwright-report
+    entrypoint: "npx playwright test --config=playwright-docker.config.ts"
+    depends_on:
+      deephaven-plugins:
+        condition: service_healthy
+
+  update-snapshots:
+    extends:
+      service: e2e-tests
+    entrypoint: 'npx playwright test --config=playwright-docker.config.ts --update-snapshots'
+    depends_on:
+      deephaven-plugins:
+        condition: service_healthy