Compare commits

...

2 Commits

Author SHA1 Message Date
David Ali
daa00c9844 fix: docker-in-docker volume issue by building e2e image 2026-01-05 19:46:04 +01:00
David Ali
83b2d73f88 unname containers 2026-01-05 19:39:37 +01:00
2 changed files with 14 additions and 9 deletions

View File

@@ -1,23 +1,17 @@
version: '3.8'
services: services:
# Serwis aplikacji budowany z naszego Dockerfile
app: app:
build: . build: .
container_name: ntwo-app
ports: ports:
- "8000:8000" - "8000:8000"
# Oficjalny kontener Cypress z przegladarkami
cypress: cypress:
image: cypress/included:13.6.0 build:
container_name: ntwo-tests context: ./e2e
# Zaleznosc: testy rusza dopiero po starcie aplikacji dockerfile: Dockerfile
depends_on: depends_on:
- app - app
environment: environment:
# Adres pod ktorym Cypress widzi nasza aplikacje w sieci Docker
- CYPRESS_baseUrl=http://app:8000 - CYPRESS_baseUrl=http://app:8000
working_dir: /e2e working_dir: /e2e
# Montowanie wolumenow: pozwala zapisac zrzuty ekranu na dysku hosta
volumes: volumes:
- ./e2e:/e2e - ./e2e:/e2e

11
e2e/Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
# e2e/Dockerfile
FROM cypress/included:13.6.0
# Ustawiamy katalog roboczy
WORKDIR /e2e
# Kopiujemy pliki testowe (cypress.config.js i folder cypress) do obrazu
COPY . .
# Domyślna komenda (można nadpisać w docker-compose)
CMD ["cypress", "run"]