File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
registry/AJ0070/modules/pgadmin Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -17,28 +17,31 @@ variable "port" {
17
17
default = 5050
18
18
}
19
19
20
- variable "log_path " {
21
- type = string
22
- description = " The path to the log file ."
23
- default = " /tmp/pgadmin.log "
20
+ variable "subdomain " {
21
+ type = bool
22
+ description = " If true, the app will be served on a subdomain ."
23
+ default = true
24
24
}
25
25
26
+ data "coder_workspace" "me" {}
27
+
26
28
resource "coder_app" "pgadmin" {
29
+ count = data. coder_workspace . me . start_count
27
30
agent_id = var. agent_id
28
31
display_name = " pgAdmin"
29
32
slug = " pgadmin"
30
33
icon = " /icon/postgres.svg"
31
- url = " http://localhost:${ var . port } "
34
+ url = var . subdomain ? " https://pgadmin- ${ data . coder_workspace . me . id } . ${ data . coder_workspace . me . access_url } " : " http://localhost:${ var . port } "
32
35
share = " owner"
33
36
}
34
37
35
38
resource "coder_script" "pgadmin" {
36
39
agent_id = var. agent_id
37
- display_name = " Install pgAdmin"
40
+ display_name = " Install and run pgAdmin"
38
41
icon = " /icon/postgres.svg"
39
42
run_on_start = true
40
43
script = templatefile (" ${ path . module } /run.sh" , {
41
44
PORT = var.port,
42
- LOG_PATH = var.log_path,
45
+ LOG_PATH = " /tmp/pgadmin.log "
43
46
})
44
47
}
You can’t perform that action at this time.
0 commit comments