TestProject Forum
Powered by leading experts in the test automation community

ComposeFile properties

First I have edited out thee API key for you.
2nd, it seems like you only have one agent image in this file.
You will need to create another image to spin another container.

version: “3.1”
services:
testproject-agent1:
image: testproject/agent:latest
depends_on:

  • chrome
  • firefox
    volumes:
  • /some/thing/testproject:/var/testproject/agent
    environment:
    TP_API_KEY: “”
    CHROME: “chrome:4444”
    FIREFOX: “firefox:4444”
    chrome:
    image: selenium/standalone-chrome
    volumes:
  • /dev/shm:/dev/shm
    firefox:
    image: selenium/standalone-firefox
    volumes:
  • /dev/shm:/dev/shm
    testproject-agent2:
    image: testproject/agent:latest
    depends_on:
  • chrome
  • firefox
    volumes:
  • /some/thing/testproject:/var/testproject/agent
    environment:
    TP_API_KEY: “”
    CHROME: “chrome:4444”
    FIREFOX: “firefox:4444”
    chrome:
    image: selenium/standalone-chrome
    volumes:
  • /dev/shm:/dev/shm
    firefox:
    image: selenium/standalone-firefox
    volumes:
  • /dev/shm:/dev/shm

version: “3.1”
services:
testproject-agent1:
image: testproject/agent:latest
depends_on:
- chrome
- firefox
volumes:
-
environment:
TP_API_KEY: “”
CHROME: “chrome:4444”
FIREFOX: “firefox:4444”
testproject-agent2:
image: testproject/agent:latest
depends_on:
- chrome
- firefox
volumes:
-
environment:
TP_API_KEY: “”
CHROME: “chrome:4444”
FIREFOX: “firefox:4444”
chrome:
image: selenium/standalone-chrome
volumes:
- /dev/shm:/dev/shm
firefox:
image: selenium/standalone-firefox
volumes:
- /dev/shm:/dev/shm

This solution create two different container but just one of them becoming live in web app

You need to make 2 services like I sent in the previous comment.

some how the text editor delete the hole yaml.

so I create a build like this

service1
agent1
service2
agent2

You only need to have services stated once
You have two services in one yaml file.

services:
testproject-agent1:
image: testproject/agent:latest
depends_on:
- chrome
- firefox
volumes:
-
environment:
TP_API_KEY: “”
CHROME: “chrome:4444”
FIREFOX: “firefox:4444”
services:
testproject-agent2:
image: testproject/agent:latest
depends_on:
- chrome
it is just a slice from it

Can you send the full yaml file to support@testproject.io

I will change it and send it back to you.

1 Like