forked from supabase/postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdigitalOcean.json
45 lines (45 loc) · 1.18 KB
/
digitalOcean.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
{
"variables": {
"do_token": "",
"image_name": "ubuntu-20-04-x64",
"region": "sgp1",
"snapshot_regions": "sgp1",
"snapshot_name": "supabase-postgres-13.3.0",
"ansible_arguments": "--skip-tags,update-only,--skip-tags,aws-only,-e,supabase_internal='false'"
},
"builders": [
{
"type": "digitalocean",
"api_token": "{{user `do_token`}}",
"image": "{{user `image_name`}}",
"region": "{{user `region`}}",
"snapshot_regions": "{{user `snapshot_regions`}}",
"size": "s-1vcpu-1gb",
"ssh_username": "root",
"snapshot_name": "{{user `snapshot_name`}}"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done"
]
},
{
"type": "ansible",
"user": "root",
"playbook_file": "ansible/playbook.yml",
"extra_arguments": "{{user `ansible_arguments`}}"
},
{
"type": "shell",
"scripts": [
"scripts/01-postgres_check.sh",
"scripts/90-cleanup.sh",
"scripts/91-log_cleanup.sh",
"scripts/99-img_check.sh"
]
}
]
}