So I have three containers, for testing purpose: 1 dev-server 2 selenium-headless 3 unit.
They all run parallel and it works fine. The only problem is that my 1 dev-server container does not exit/stop when the other two hav exited and done running the tests. I also wants it exit with 1 if one of the other containers exit with code 1, of course.
What should I do and add for it to exit after the other two containers are exited?
My docker-compose file looks like this. :
version: "3"
services:
dev-server:
build: .
tty: true
hostname: yeti-ui
container_name: yeti-ui
ports:
- 127.0.0.01:8080:8080
- 35729:35729
environment:
- "SKIP_DOCS=0"
- "SCHEME=http"
- "NODE_ENV=stage"
entrypoint: npm
command: run dev-server
headless-chrome:
build:
context: .
dockerfile: ./Dockerfile-headless-chrome
cap_add:
- SYS_ADMIN
network_mode: "host"
unit-test:
build: .
entrypoint: npm
command: test