parent
cbf4e851e2
commit
05c7c2c423
@ -0,0 +1,23 @@
|
||||
# vim:filetype=nginx
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name ${server_name};
|
||||
ssl_certificate spoke.crt;
|
||||
ssl_certificate_key spoke.key;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
access_log /var/log/nginx/spoke.access.log combined;
|
||||
index index.html;
|
||||
root /home/spoke/app/build/client;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://127.0.0.1:${port};
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
output "loadbalancer_ip" {
|
||||
value = digitalocean_loadbalancer.app.ip
|
||||
}
|
||||
|
||||
output "droplet_urn" {
|
||||
value = digitalocean_droplet.app.urn
|
||||
}
|
||||
|
||||
output "loadbalancer_urn" {
|
||||
value = digitalocean_loadbalancer.app.urn
|
||||
}
|
||||
|
||||
output "database_cluster_urn" {
|
||||
value = digitalocean_database_cluster.pg.urn
|
||||
}
|
||||
|
||||
output "droplet_ipv4_address" {
|
||||
value = digitalocean_droplet.app.ipv4_address
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
variable "base_url" {
|
||||
description = "Fully qualified https URL of the app"
|
||||
}
|
||||
|
||||
variable "resource_prefix" {
|
||||
description = "Prefix prepended to resource names"
|
||||
default = "spoke-"
|
||||
}
|
||||
|
||||
variable "node_options" {
|
||||
description = "Value defined at build time and run time as NODE_OPTIONS"
|
||||
default = "--max_old_space_size=8192"
|
||||
}
|
||||
|
||||
variable "node_env" {
|
||||
description = "Value defined at build time and run time as NODE_ENV"
|
||||
default = "production"
|
||||
}
|
||||
|
||||
variable "port" {
|
||||
description = "TCP port used to communicate between droplet and load balancer"
|
||||
default = "3000"
|
||||
}
|
||||
|
||||
variable "droplet_size" {
|
||||
description = "Size value passed when provisioning app droplet"
|
||||
default = "s-1vcpu-1gb"
|
||||
}
|
||||
|
||||
variable "database_cluster_size" {
|
||||
description = "Size value passed when provisioning database cluster"
|
||||
default = "db-s-1vcpu-1gb"
|
||||
}
|
||||
|
||||
variable "database_cluster_node_count" {
|
||||
default = 1
|
||||
}
|
||||
|
||||
variable "region" {
|
||||
description = "Region at which all resources will be provisioned"
|
||||
default = "nyc1"
|
||||
}
|
||||
|
||||
variable "ssh_keys" {
|
||||
type = "list"
|
||||
description = "List of ssh public keys to pass to droplet provisioning"
|
||||
}
|
||||
|
||||
variable "cert_private_key" {
|
||||
description = "Certificate key to use when defining th cert used with the load balancer"
|
||||
}
|
||||
|
||||
variable "cert_leaf_certificate" {
|
||||
description = "Leaf certificate to use when defining the cert used with the load balancer"
|
||||
}
|
||||
|
||||
variable "env" {
|
||||
type = "map"
|
||||
description = "Arbitrary *additional* environment variables passed at build time and run time"
|
||||
default = {}
|
||||
}
|
Loading…
Reference in new issue