version: '3.7' services: collector-db: image: mongo:8.0 container_name: collector-db test-db: image: mongo:8.0 container_name: test-db profiler-webapp: build: context: . dockerfile: Dockerfile container_name: profiler-webapp depends_on: - collector-db - test-db ports: - "8080:8080" # You may restrict the mapping to the host IP only # if run on localhost e.g. Docker: #- "127.0.0.1:8080:8080" # if run inside VM e.g. Podman or Lima on MacOS: #- "192.168.127.2:8080:8080" links: - "collector-db" - "test-db"