Skip to content

feat(sqldb): support ENCORE_DOCKER_NETWORK env var - #2392

Open
odsod wants to merge 1 commit into
encoredev:mainfrom
odsod:encore-docker-network
Open

odsod wants to merge 1 commit into
encoredev:mainfrom
odsod:encore-docker-network

Conversation

@odsod

@odsod odsod commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Usage

# Google Cloud Build
- id: test
  name: my-builder-image
  env:
    - ENCORE_DOCKER_NETWORK=cloudbuild
  args: [-c, encore test ./...]

- Pass --network to docker run when ENCORE_DOCKER_NETWORK is set
- Fixes encoredev#2382: Postgres containers unreachable in CI
  environments that use non-default Docker networks (Cloud Build, etc.)
@fredr fredr self-assigned this Apr 15, 2026
@fredr

fredr commented Apr 15, 2026

Copy link
Copy Markdown
Member

Thanks for adding this!

I don't think it is enough to just set the network name, we connect to 127.0.0.1 down in clusterStatus, and for this to work I think we need to use the container name instead. So maybe if the docker network env var is set, connect to containerName:port instead of 127.0.0.1:port

@fredr fredr unassigned fredr Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support configurable Docker network for test databases (ENCORE_DOCKER_NETWORK)

2 participants