-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.hcl
72 lines (60 loc) · 1.29 KB
/
main.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
resource "network" "main" {
subnet = "10.5.0.0/16"
}
resource "container" "postgres" {
network {
id = resource.network.main.meta.id
}
image {
name = "postgres:13"
}
environment = {
POSTGRES_PASSWORD = "temporal"
POSTGRES_USER = "temporal"
}
health_check {
timeout = "30s"
exec {
script = "pg_isready"
}
}
port {
local = 5432
host = 5432
}
}
resource "template" "temporal_config" {
source = <<-EOF
limit.maxIDLength:
- value: 255
constraints: {}
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
EOF
destination = "${data("temporal")}/config.yaml"
}
resource "container" "temporal" {
network {
id = resource.network.main.meta.id
}
image {
name = "temporalio/auto-setup:1.24.2"
}
environment = {
DB = "postgres12"
ID = resource.container.postgres.meta.id
DB_PORT_3 = "${resource.container.postgres.port.0.local}"
POSTGRES_SEEDS = "postgres"
POSTGRES_USER = "temporal"
POSTGRES_PWD = "temporal"
}
volume {
source = data("temporal")
destination = "/etc/temporal/config/dynamicconfig"
}
port {
local = 7233
host = 7233
}
}