jdormit-infra/prod/freshrss/packer/freshrss.json

76 lines
1.9 KiB
JSON
Raw Normal View History

2021-02-03 15:38:23 +00:00
{
"variables": {
"freshrss_user": "{{env `FRESHRSS_USER`}}",
"freshrss_password": "{{env `FRESHRSS_PASSWORD`}}",
"freshrss_api_password": "{{env `FRESHRSS_API_PASSWORD`}}",
"freshrss_email": "{{env `FRESHRSS_EMAIL`}}",
"freshrss_token": "{{env `FRESHRSS_TOKEN`}}"
},
"sensitive-variables": [
"freshrss_password",
"freshrss_api_password",
"freshrss_token"
],
"builders": [
{
"type": "digitalocean",
"image": "ubuntu-20-04-x64",
"region": "nyc1",
"size": "s-1vcpu-1gb",
"snapshot_name": "packer-freshrss-{{timestamp}}",
"ssh_username": "root"
}
],
"provisioners": [
{
"type": "shell",
"script": "scripts/dependencies.sh"
},
{
"type": "file",
"source": "files/freshrss.timer",
"destination": "/tmp/freshrss.timer"
},
{
"type": "file",
"source": "files/freshrss.service",
"destination": "/tmp/freshrss.service"
},
{
"type": "shell",
"script": "scripts/freshrss.sh",
"environment_vars": [
"FRESHRSS_USER={{user `freshrss_user`}}",
"FRESHRSS_PASSWORD={{user `freshrss_password`}}",
"FRESHRSS_API_PASSWORD={{user `freshrss_api_password`}}",
"FRESHRSS_EMAIL={{user `freshrss_email`}}",
"FRESHRSS_TOKEN={{user `freshrss_token`}}"
]
},
{
"type": "file",
"source": "files/freshrss-nginx.conf",
"destination": "/tmp/freshrss.conf"
},
{
"type": "file",
"source": "certbot/live/rss.jeremydormitzer.com/fullchain.pem",
"destination": "/tmp/fullchain.pem"
},
{
"type": "file",
"source": "certbot/live/rss.jeremydormitzer.com/privkey.pem",
"destination": "/tmp/privkey.pem"
},
{
"type": "shell",
"script": "scripts/nginx.sh"
}
],
"post-processors": [
{
"type": "manifest"
}
]
}