jdormit-infra/prod/wallabag/packer/wallabag.json
2021-01-07 10:48:14 -05:00

69 lines
1.5 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": "certbot/live/wallabag.jeremydormitzer.com/fullchain.pem",
"destination": "/tmp/fullchain.pem"
},
{
"type": "file",
"source": "certbot/live/wallabag.jeremydormitzer.com/privkey.pem",
"destination": "/tmp/privkey.pem"
},
{
"type": "file",
"source": "files/wallabag-nginx.conf",
"destination": "/tmp/wallabag-nginx.conf"
},
{
"type": "shell",
"script": "scripts/nginx.sh"
}
],
"post-processors": [
{
"type": "manifest"
}
]
}