Skip to content

Accessing 'services' from another container #26948

Answered by henrythor
henrythor asked this question in Actions
Discussion options

You must be logged in to vote

Naturally, as soon as I had buckled and asked for help I figured it out on my own.

I can connect the network like so:

docker network connect ${{ job.services.postgres.network }} leyfisbref_web

It will still fail in the entry point but the test command will run ok. If anyone has a better idea I’d be very grateful

Here’s my new pythonapp.yml:

name: Leyfisbref CI

on: [push]

jobs:
build:
runs-on: ubuntu-18.04
services:
postgres:
image: postgres:11
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: secret-password
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- name: Copy ci.env to .env
run: cp ci.env .env
- name: Build…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
1 participant