2019-07-30 17:23:34 +00:00
|
|
|
locals {
|
|
|
|
dev_env = {
|
|
|
|
/* WARNING EB forces PORT 8081 */
|
2019-08-05 18:32:53 +00:00
|
|
|
ENVIRONMENT = "DEV"
|
|
|
|
RATE_LIMIT_TIME = 15 /* ms window */
|
|
|
|
RATE_LIMIT_MAX_REQ = 1
|
2019-07-30 17:23:34 +00:00
|
|
|
/* Access */
|
2019-07-30 18:36:52 +00:00
|
|
|
ADMIN_USER = var.dap_ps_admin_user
|
|
|
|
ADMIN_PASSWORD = var.dap_ps_admin_pass
|
2019-07-30 17:23:34 +00:00
|
|
|
/* Database */
|
2019-07-30 19:08:34 +00:00
|
|
|
DB_CONNECTION = var.dap_ps_dev_db_uri
|
|
|
|
/* Blockchain */
|
2019-07-30 17:23:34 +00:00
|
|
|
BLOCKCHAIN_CONNECTION_POINT = "wss://ropsten.infura.io/ws/v3/8675214b97b44e96b70d05326c61fd6a"
|
2019-08-05 20:26:13 +00:00
|
|
|
DISCOVER_CONTRACT = "0x9fb115BC152aE21ECDc81c73843673fa38e4D2dB"
|
2019-07-30 17:23:34 +00:00
|
|
|
/* IPFS */
|
|
|
|
IPFS_HOST = "ipfs.infura.io"
|
|
|
|
IPFS_PORT = 5001
|
|
|
|
IPFS_PROTOCOL = "https"
|
|
|
|
/* Email */
|
2019-07-30 18:36:52 +00:00
|
|
|
EMAIL_USER = var.dap_ps_smtp_user
|
|
|
|
EMAIL_PASSWORD = var.dap_ps_smtp_pass
|
2019-07-30 17:23:34 +00:00
|
|
|
EMAIL_HOST = "email-smtp.us-east-1.amazonaws.com"
|
|
|
|
EMAIL_PORT = 465
|
|
|
|
EMAIL_TLS = "true"
|
2019-08-06 15:43:23 +00:00
|
|
|
APPROVE_NOTIFIER_MAIL = "approvals@dap.ps" /* FROM */
|
2019-07-30 17:23:34 +00:00
|
|
|
APPROVER_MAIL = "dapps-approvals@status.im"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-31 19:23:31 +00:00
|
|
|
module "dev_db_bucket" {
|
|
|
|
source = "./modules/aws-s3-bucket"
|
|
|
|
bucket_name = "dev-dap-ps-db-backups"
|
|
|
|
description = "Bucket for MongoDB backups on db.dev"
|
|
|
|
}
|
|
|
|
|
2019-07-31 16:27:32 +00:00
|
|
|
module "dev_db" {
|
|
|
|
source = "./modules/aws-ec2-instance"
|
2019-07-31 17:48:48 +00:00
|
|
|
groups = ["mongodb"]
|
2019-07-31 16:27:32 +00:00
|
|
|
env = "db"
|
|
|
|
stage = "dev"
|
|
|
|
host_count = 1
|
|
|
|
subdomain = var.hosts_subdomain
|
|
|
|
domain = var.public_domain
|
|
|
|
open_ports = [27017] /* mongodb */
|
|
|
|
|
|
|
|
/* Plumbing */
|
|
|
|
keypair_name = aws_key_pair.admin.key_name
|
|
|
|
gandi_zone_id = gandi_zone.dap_ps_zone.id
|
|
|
|
}
|
|
|
|
|
2019-08-01 18:20:28 +00:00
|
|
|
module "dev_env" {
|
2019-07-30 19:08:34 +00:00
|
|
|
source = "./modules/aws-eb-env"
|
|
|
|
name = "dev-dap-ps"
|
|
|
|
stage = "dev"
|
|
|
|
env_vars = local.dev_env
|
|
|
|
dns_domain = var.public_domain
|
|
|
|
stack_name = var.stack_name
|
|
|
|
|
|
|
|
/* Plumbing */
|
2019-07-30 18:36:52 +00:00
|
|
|
keypair_name = aws_key_pair.admin.key_name
|
2019-07-30 19:08:34 +00:00
|
|
|
gandi_zone_id = gandi_zone.dap_ps_zone.id
|
2019-07-30 17:23:34 +00:00
|
|
|
|
|
|
|
/* Scaling */
|
2019-07-31 16:27:32 +00:00
|
|
|
instance_type = "t3.small"
|
2019-07-30 17:23:34 +00:00
|
|
|
autoscale_min = 1
|
|
|
|
autoscale_max = 2
|
|
|
|
}
|