-
Notifications
You must be signed in to change notification settings - Fork 1
/
wiki.tf
59 lines (50 loc) · 1.12 KB
/
wiki.tf
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
data "template_file" "wiki-config" {
template = file("docker/conf/wiki.tpl")
vars = {
DB_PASSWORD = data.pass_password.wiki-db-password.password
}
}
resource "local_file" "wiki-config" {
content = data.template_file.wiki-config.rendered
filename = "docker/conf/wiki.yml"
}
module "wiki-container" {
name = "wiki2"
source = "./modules/container"
image = "requarks/wiki:2"
resource = {
memory = 1024
memory_swap = 1024
}
web = {
expose = true
port = 3000
host = "wiki.bb8.fun"
}
networks = ["postgres", "external"]
uploads = [
{
content = file("docker/conf/wiki.yml")
file = "/wiki/config.yml"
},
]
volumes = [
{
host_path = "/mnt/xwing/data/wiki/data"
container_path = "/data"
},
{
host_path = "/mnt/xwing/data/wiki/databackup"
container_path = "/old/data"
},
{
host_path = "/mnt/xwing/data/wiki/repo"
container_path = "/old/repo"
},
]
}
module "wiki-db" {
source = "./modules/postgres"
name = "wikijs"
password = data.pass_password.wiki-db-password.password
}