In the meantime, I found a solution to my question. I needed to add my app
container to the services with an alias to establish a connection. While executing commands inside this container is not possible, the app
container is successfully serving content and is accessible by the Playwright container.
container-tests:
stage: test
when: always
image: mcr.microsoft.com/playwright/python:v1.50.0-noble
services:
- name: ${CI_REGISTRY_IMAGE}
alias: app
script:
- pip install pytest-base-url pytest-playwright playwright
- playwright install
- pytest tests --base-url='http://app'