How to run nightwatch e2e tests on gitlab CI?

I would like to add some e2e tests for my vue.js application and run them in the pipeline.
The corresponding part in my gitlab-ci.yml looks like this:
image: node:8
- npm install
- name: selenium/standalone-chrome
alias: chrome
stage: testing
- cd online-leasing-frontend
- npm install
- npm run test:e2e

And my nightwatch.js config:

  "selenium": {
    "start_process": false
  "test_settings": {
    "default": {
      "selenium_port": 4444,
      "selenium_host": "chrome"

Is “selenium_host”: “chrome” the correct way of setting the host to the selenium service?
I get the following error indicating that my e2e test can’t connect to the selenium service:

Connection refused! Is selenium server started?

Any tips?

Maybe use a “sleep 15” before starting your E2E tests to let time to selenium server to be ready…