packer-cn/website/packer.json

37 lines
1000 B
JSON
Raw Normal View History

2016-01-13 21:54:08 -05:00
{
"variables": {
"aws_access_key_id": "{{ env `AWS_ACCESS_KEY_ID` }}",
"aws_secret_access_key": "{{ env `AWS_SECRET_ACCESS_KEY` }}",
"aws_region": "{{ env `AWS_REGION` }}",
2018-03-23 13:21:24 -04:00
"website_environment": "production",
2016-01-13 21:54:08 -05:00
"fastly_api_key": "{{ env `FASTLY_API_KEY` }}"
},
"builders": [
{
"type": "docker",
2018-04-17 14:44:43 -04:00
"image": "hashicorp/middleman-hashicorp:0.3.37",
2017-03-08 14:22:54 -05:00
"discard": "true",
2017-08-02 14:25:13 -04:00
"volumes": {
"{{ pwd }}": "/website"
}
2016-01-13 21:54:08 -05:00
}
],
"provisioners": [
{
"type": "shell",
"environment_vars": [
"AWS_ACCESS_KEY_ID={{ user `aws_access_key_id` }}",
"AWS_SECRET_ACCESS_KEY={{ user `aws_secret_access_key` }}",
"AWS_REGION={{ user `aws_region` }}",
2018-03-23 13:21:24 -04:00
"ENV={{ user `website_environment` }}",
2016-01-13 21:54:08 -05:00
"FASTLY_API_KEY={{ user `fastly_api_key` }}"
],
"inline": [
2017-03-08 14:22:54 -05:00
"bundle check || bundle install",
2016-01-13 21:54:08 -05:00
"bundle exec middleman build",
2017-08-02 14:25:13 -04:00
"/bin/bash ./scripts/deploy.sh"
2016-01-13 21:54:08 -05:00
]
}
]
}