mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: example: update docker-local to use host-gateway (#1507)
* fix: example: update docker-local to use host-gateway * docker-compose.yaml: Add POSTGRES_ environment variables to CODER_PG_CONNECTION_URL Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
co-authored by
Mathias Fredriksson
parent
fc9efc2b79
commit
75dc8f59f6
@@ -15,6 +15,10 @@ provider "docker" {
|
||||
host = "unix:///var/run/docker.sock"
|
||||
}
|
||||
|
||||
provider "coder" {
|
||||
url = "http://host.docker.internal:7080"
|
||||
}
|
||||
|
||||
data "coder_workspace" "me" {
|
||||
}
|
||||
|
||||
@@ -43,6 +47,10 @@ resource "docker_container" "workspace" {
|
||||
dns = ["1.1.1.1"]
|
||||
command = ["sh", "-c", coder_agent.dev.init_script]
|
||||
env = ["CODER_AGENT_TOKEN=${coder_agent.dev.token}"]
|
||||
host {
|
||||
host = "host.docker.internal"
|
||||
ip = "host-gateway"
|
||||
}
|
||||
volumes {
|
||||
container_path = "/home/coder/"
|
||||
volume_name = docker_volume.coder_volume.name
|
||||
|
||||
Reference in New Issue
Block a user