-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.json
102 lines (102 loc) · 2.7 KB
/
template.json
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
"variables": {
"do_api_token": "{{env `DIGITALOCEAN_API_TOKEN`}}",
"image_name": "flowfuse-{{env `FF_DASH_VERSION`}}-snapshot-{{timestamp}}",
"apt_packages": "apt-transport-https ca-certificates curl jq linux-image-extra-virtual software-properties-common ",
"application_name": "FlowFuse",
"application_version": "{{env `FF_VERSION`}}",
"docker_compose_version": "v2.29.7"
},
"sensitive-variables": [
"do_api_token"
],
"builders": [
{
"type": "digitalocean",
"api_token": "{{user `do_api_token`}}",
"image": "ubuntu-22-04-x64",
"region": "lon1",
"size": "s-1vcpu-1gb",
"ssh_username": "root",
"snapshot_name": "{{user `image_name`}}"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"cloud-init status --wait"
]
},
{
"type": "file",
"source": "files/var/",
"destination": "/var/"
},
{
"type": "file",
"source": "files/etc/",
"destination": "/etc/"
},
{
"type": "shell",
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive",
"LC_ALL=C",
"LANG=en_US.UTF-8",
"LC_CTYPE=en_US.UTF-8"
],
"inline": [
"apt -qqy update",
"apt -qqy -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' full-upgrade",
"apt -qqy -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install {{user `apt_packages`}}",
"apt-get -qqy clean"
]
},
{
"type": "shell",
"environment_vars": [
"application_name={{user `application_name`}}",
"application_version={{user `application_version`}}",
"docker_compose_version={{user `docker_compose_version`}}",
"DEBIAN_FRONTEND=noninteractive",
"LC_ALL=C",
"LANG=en_US.UTF-8",
"LC_CTYPE=en_US.UTF-8"
],
"scripts": [
"scripts/010-docker.sh",
"scripts/011-docker-compose.sh",
"scripts/012-grub-opts.sh",
"scripts/013-docker-dns.sh",
"scripts/014-ufw-flowfuse.sh",
"scripts/015-flowfuse.sh",
"scripts/016-first-run.sh",
"scripts/020-application-tag.sh",
"scripts/900-cleanup.sh",
"scripts/999-img-check.sh"
]
},
{
"type": "file",
"source": "files/opt/flowfuse/",
"destination": "/opt/flowfuse/"
}
],
"post-processors": [
{
"type": "manifest",
"output": "manifest.json",
"strip_path": true
},
{
"type": "shell-local",
"environment_vars": [
"application_version={{user `application_version`}}"
],
"scripts": [
"scripts/market-place-submit.sh"
]
}
]
}