Skip to content

Commit d9a00da

Browse files
bpmctkylecarbs
authored andcommitted
chore: use docker host in docker-compose (#1592)
1 parent d457f93 commit d9a00da

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

docker-compose.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
version: "3.9"
22
services:
33
coder:
4-
image: ghcr.io/coder/coder:v${CODER_VERSION:-0.5.6}-${ARCH:-amd64}
4+
image: ghcr.io/coder/coder:v${CODER_VERSION:-0.5.10}-${ARCH:-amd64}
55
ports:
66
- "7080:7080"
77
environment:
88
CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER:-username}:${POSTGRES_PASSWORD:-password}@database/${POSTGRES_DB:-coder}?sslmode=disable"
99
CODER_ADDRESS: "0.0.0.0:7080"
10+
# You'll need to set CODER_ACCESS_URL to an
11+
# externally-reachable IP to use non-Docker examples!
12+
CODER_ACCESS_URL: "${CODER_ACCESS_URL:-http://host.docker.internal:7080}"
1013
volumes:
1114
- /var/run/docker.sock:/var/run/docker.sock
1215
depends_on:

examples/docker-image-builds/main.tf

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ provider "docker" {
4242
}
4343

4444
provider "coder" {
45-
# The below assumes your Coder deployment is running in docker-compose.
46-
# If this is not the case, either comment or edit the below.
47-
url = "http://host.docker.internal:7080"
4845
}
4946

5047
data "coder_workspace" "me" {

examples/docker/main.tf

-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ provider "docker" {
4949
}
5050

5151
provider "coder" {
52-
# The below assumes your Coder deployment is running in docker-compose.
53-
# If this is not the case, either comment or edit the below.
54-
url = "http://host.docker.internal:7080"
5552
}
5653

5754
data "coder_workspace" "me" {

0 commit comments

Comments
 (0)