-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathservices.tf
More file actions
68 lines (60 loc) · 1.38 KB
/
services.tf
File metadata and controls
68 lines (60 loc) · 1.38 KB
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
resource "rancher_stack" "happy" {
name = "happy"
description = "A service that's always happy"
start_on_create = true
environment_id = "${rancher_environment.production.id}"
docker_compose = <<EOF
version: '2'
services:
happy:
image: peloton/happy-service
stdin_open: true
tty: true
ports:
- 8000:80/tcp
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.global: 'true'
started: $STARTED
EOF
rancher_compose = <<EOF
version: '2'
services:
happy:
start_on_create: true
EOF
finish_upgrade = true
environment {
STARTED = "${timestamp()}"
}
}
resource "rancher_stack" "glad" {
name = "glad"
description = "A service that's always glad"
start_on_create = true
environment_id = "${rancher_environment.production.id}"
docker_compose = <<EOF
version: '2'
services:
glad:
image: peloton/glad-service
stdin_open: true
tty: true
ports:
- 8001:80/tcp
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.global: 'true'
started: $STARTED
EOF
rancher_compose = <<EOF
version: '2'
services:
glad:
start_on_create: true
EOF
finish_upgrade = true
environment {
STARTED = "${timestamp()}"
}
}