diff --git a/docker-compose.yml b/docker-compose.yml index 5edb8361..88dddcf0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,6 +36,29 @@ services: - 7070:8080 build: context: . + remote: + container_name: remote + environment: + - DOZZLE_REMOTE_HOST=tcp://proxy:2375 + - DOZZLE_FILTER=name=dozzle + - DOZZLE_NO_ANALYTICS=1 + ports: + - 5050:8080 + build: + context: . + depends_on: + - proxy + + proxy: + container_name: proxy + image: tecnativa/docker-socket-proxy + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - CONTAINERS=1 + ports: + - 2375:2375 + playwright: container_name: playwright image: mcr.microsoft.com/playwright:v1.35.1-jammy @@ -50,3 +73,4 @@ services: - dozzle - custom_base - auth + - remote diff --git a/e2e/remote.spec.ts b/e2e/remote.spec.ts new file mode 100644 index 00000000..835ed414 --- /dev/null +++ b/e2e/remote.spec.ts @@ -0,0 +1,15 @@ +import { test, expect } from "@playwright/test"; + +test.beforeEach(async ({ page }) => { + await page.goto("http://remote:8080/"); +}); + +test("has right title", async ({ page }) => { + await expect(page).toHaveTitle(/.* - Dozzle/); +}); + +test("select running container", async ({ page }) => { + await page.locator("ul.menu-list").getByRole("link", { name: "dozzle" }).click(); + await expect(page).toHaveURL(/\/container/); + await expect(page.getByText("Accepting connections")).toBeVisible(); +});