jdormit-infra/prod/wallabag/packer/wallabag.json
2021-10-05 17:45:53 -04:00

57 lines
1.2 KiB
JSON

{
"variables": {
"wallabag_admin_password": "{{env `WALLABAG_PASSWORD`}}"
},
"sensitive-variables": ["wallabag_admin_password"],
"builders": [
{
"type": "digitalocean",
"image": "ubuntu-18-04-x64",
"region": "nyc1",
"size": "s-1vcpu-1gb",
"snapshot_name": "packer-wallabag-{{timestamp}}",
"ssh_username": "root"
}
],
"provisioners": [
{
"type": "shell",
"script": "scripts/dependencies.sh"
},
{
"type": "file",
"source": "files/wallabag-params.yml",
"destination": "/tmp/wallabag-params.yml"
},
{
"type": "file",
"source": "files/entries.json",
"destination": "/tmp/entries.json"
},
{
"type": "file",
"source": "files/clients.sql",
"destination": "/tmp/clients.sql"
},
{
"type": "shell",
"environment_vars": ["ADMIN_PASSWORD={{user `wallabag_admin_password`}}"],
"script": "scripts/wallabag.sh"
},
{
"type": "file",
"source": "files/wallabag-nginx.conf",
"destination": "/tmp/wallabag-nginx.conf"
},
{
"type": "shell",
"script": "scripts/nginx.sh"
}
],
"post-processors": [
{
"type": "manifest"
}
]
}