Skip to content

Commit

Permalink
Chore: change location rule in nginx conf (ToolJet#320)
Browse files Browse the repository at this point in the history
* change location rule in nginx conf; enable std out logging

* use packer variables to set ami name, instance type and ami region
  • Loading branch information
ashishmax31 committed Jun 25, 2021
1 parent de76116 commit 80d5ec5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions deploy/ec2/.env
Expand Up @@ -5,3 +5,4 @@ PG_DB=tooljet_prod
PG_USER=<pg user name>
PG_HOST=<pg host>
PG_PASS=<pg user password>
RAILS_LOG_TO_STDOUT=true
4 changes: 2 additions & 2 deletions deploy/ec2/nginx.conf
Expand Up @@ -58,7 +58,7 @@ http
location /
{
root /home/ubuntu/app/frontend/build;
index index.html;
try_files $uri $uri/ /index.html;
}

location /_backend_
Expand All @@ -84,7 +84,7 @@ http
location /
{
root /home/ubuntu/app/frontend/build;
index index.html;
try_files $uri $uri/ /index.html;
}

location /_backend_
Expand Down
6 changes: 3 additions & 3 deletions deploy/ec2/tool_jet_ubuntu_bionic.pkr.hcl
Expand Up @@ -8,9 +8,9 @@ packer {
}

source "amazon-ebs" "ubuntu" {
ami_name = "tooljet_latest_ubuntu_bionic"
instance_type = "t2.medium"
region = "us-west-2"
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-*"
Expand Down
14 changes: 14 additions & 0 deletions deploy/ec2/variables.pkr.hcl
@@ -0,0 +1,14 @@

variable "ami_name" {
type = string
}

variable "instance_type" {
type = string
default = "t2.medium"
}

variable "ami_region" {
type = string
default = "us-west-2"
}

0 comments on commit 80d5ec5

Please sign in to comment.