ToolJet/deploy/ec2/tool_jet_ubuntu_bionic.pkr.hcl
Ashish 80d5ec536d
Chore: change location rule in nginx conf (#320)
* change location rule in nginx conf; enable std out logging

* use packer variables to set ami name, instance type and ami region
2021-06-25 21:43:38 +05:30

55 lines
1 KiB
HCL

packer {
required_plugins {
amazon = {
version = ">= 0.0.1"
source = "github.com/hashicorp/amazon"
}
}
}
source "amazon-ebs" "ubuntu" {
ami_name = "${var.ami_name}"
instance_type = "${var.instance_type}"
region = "${var.ami_region}"
source_ami_filter {
filters = {
name = "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = ["099720109477"]
}
ssh_username = "ubuntu"
}
build {
sources = [
"source.amazon-ebs.ubuntu"
]
provisioner "file"{
source = "puma.service"
destination = "/tmp/puma.service"
}
provisioner "file"{
source = "nginx.conf"
destination = "/tmp/nginx.conf"
}
provisioner "file"{
source = ".env"
destination = "/tmp/.env"
}
provisioner "file"{
source = "setup_app"
destination = "/tmp/setup_app"
}
provisioner "shell" {
script = "setup_machine.sh"
}
}