No network between dockers #510

Open
opened 2024-03-06 11:15:48 +00:00 by Zig1375 · 1 comment

I have such a script:

name: Example

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]
    
jobs:
  test:
    name: test
    runs-on: ubuntu-latest
    steps:
      - name : Checkout
        uses: actions/checkout@v4

      - name: Setup bun
        uses: oven-sh/setup-bun@v1

      - name: Start MongoDB
        uses: supercharge/mongodb-github-action@1.10.0
        with:
          mongodb-version: '7.0'
          mongodb-port: 27017
          mongodb-database: 'testdb'
          mongodb-replica-set: rs0

      - name: Install dependencies
        run: bun i

      - name: Run tests
        run: bun test --timeout 10000

In GitHub Actions, I can connect to Mongo via 127.0.0.1, but in act_runner, I cannot do it in any way except by using the global domain address... I tried to use 127.0.0.1 or container name mongodb (i used this name to kill docker container) and app cannot connect to mongo...

I have such a script: ```yaml name: Example on: push: branches: [ "master" ] pull_request: branches: [ "master" ] jobs: test: name: test runs-on: ubuntu-latest steps: - name : Checkout uses: actions/checkout@v4 - name: Setup bun uses: oven-sh/setup-bun@v1 - name: Start MongoDB uses: supercharge/mongodb-github-action@1.10.0 with: mongodb-version: '7.0' mongodb-port: 27017 mongodb-database: 'testdb' mongodb-replica-set: rs0 - name: Install dependencies run: bun i - name: Run tests run: bun test --timeout 10000 ``` In GitHub Actions, I can connect to Mongo via `127.0.0.1`, but in act_runner, I cannot do it in any way except by using the global domain address... I tried to use `127.0.0.1` or container name `mongodb` (i used this name to kill docker container) and app cannot connect to mongo...
Owner

If the service is an action internal service, use the service name as the host name.
If the service is an external service, use the external IP of that service.

If the service is an action internal service, use the service name as the host name. If the service is an external service, use the external IP of that service.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act_runner#510
No description provided.