Fauna Dev (docker image) and Github Actions

I’ve been trying to set up a testing workflow using the fauna/faunadb docker image, but the container won’t initialize when I specify the ports:

name: Test
on: [push]

jobs:
  job:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
      - uses: pnpm/action-setup@v2.0.1
        with:
          version: 6
      - run: pnpm prune
      - run: pnpm run dev
    services:
      fauna:
        image: fauna/faunadb
        ports:
          - 8443:8443
          - 8084:8084
  Error response from daemon: driver failed programming external connectivity on endpoint [...]: Error starting userland proxy: listen tcp4 0.0.0.0:8084: bind: address already in use

This doesn’t happen if I don’t specify the ports, but, this way, the endpoint is not exposed (this runs, but the script won’t connect with http://localhost:8443 or http://localhost:8084)

  job:
    runs-on: ubuntu-latest
    steps: # My steps
    services:
      fauna:
        image: fauna/faunadb

Your actions definition indicates that you want to run on port 80 (assuming that the docker/getting-started image means the fauna/faunadb image), but the error message says that it’s running on port 8084, and that port is already in use.

Can you show us the full definition (eliding any auth tokens or other details that should not be public)?

I pasted the wrong file 🤦, the docker/getting-started image actually runs. The snippet is correct now.

That definitely looks better. Those are, indeed, the standard ports to use.

However, something is already running on port 8084. You’ll need to either stop that other thing from running (if you can, assuming that it’s not a GitHub-provided service that’s necessary), or update the configuration to use different ports for the fauna/faunadb image.

You can likely choose most any port above 1024 (and lower than 65,000).If you get another address already in use error, increment the port numer and try again. Whatever port you use, make sure that your client connections use the same port.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.