[WIP] Begin adding packer config for centralized ssl termination
This commit is contained in:
parent
35ebe35eb2
commit
e3feb6d3f7
26
prod/nginx/packer/nginx.json
Normal file
26
prod/nginx/packer/nginx.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"builders": [
|
||||
{
|
||||
"type": "digitalocean",
|
||||
"image": "ubuntu-18-04-x64",
|
||||
"region": "nyc1",
|
||||
"size": "s-1vcpu-1gb",
|
||||
"snapshot_name": "packer-nginx-{{timestamp}}",
|
||||
"ssh_username": "root"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "scripts/dependencies.sh"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "files/nginx.conf"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "scripts/nginx.sh"
|
||||
}
|
||||
]
|
||||
}
|
6
prod/nginx/packer/scripts/dependencies.sh
Normal file
6
prod/nginx/packer/scripts/dependencies.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xe
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nginx
|
5
prod/nginx/packer/scripts/nginx.sh
Normal file
5
prod/nginx/packer/scripts/nginx.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -xe
|
||||
|
||||
sudo systemctl enable nginx
|
Loading…
Reference in New Issue
Block a user