You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
1.7 KiB
84 lines
1.7 KiB
project = "page-recorder"
|
|
|
|
runner {
|
|
enabled = true
|
|
data_source "git" {
|
|
url = "git@git.smaug.dev:ereborstudios/page-recorder.git"
|
|
ref = "master"
|
|
}
|
|
}
|
|
|
|
# Labels can be specified for organizational purposes.
|
|
# labels = { "foo" = "bar" }
|
|
|
|
# An application to deploy.
|
|
app "page-recorder" {
|
|
|
|
config {
|
|
env = {
|
|
REDIS_HOST = var.redis_host
|
|
REDIS_PORT = var.redis_port
|
|
REDIS_PASSWORD = var.redis_password
|
|
}
|
|
}
|
|
|
|
labels = {
|
|
"service" = var.name
|
|
}
|
|
|
|
# Build specifies how an application should be deployed. In this case,
|
|
# we'll build using a Dockerfile and keeping it in a local registry.
|
|
build {
|
|
use "docker" {
|
|
}
|
|
}
|
|
|
|
# Deploy to Docker
|
|
deploy {
|
|
use "docker" {
|
|
service_port = 8080
|
|
static_environment = {
|
|
"NODE_ENV": "production"
|
|
"REDIS_HOST": var.redis_host
|
|
"REDIS_PORT": var.redis_port
|
|
"REDIS_PASSWORD": var.redis_password
|
|
}
|
|
|
|
labels = {
|
|
"traefik.http.routers.${var.name}.rule" = "Host(`${var.host}`, `${var.name}.waypoint.smaug.dev`)"
|
|
"traefik.http.routers.${var.name}.entrypoints" = "websecure"
|
|
"traefik.http.routers.${var.name}.tls.certresolver" = "myresolver"
|
|
"traefik.http.services.${var.name}.loadbalancer.server.port" = "8080"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
variable "name" {
|
|
type = string
|
|
default = "page-recorder"
|
|
description = "Project name"
|
|
}
|
|
|
|
variable "host" {
|
|
type = string
|
|
default = "preview.smaug.dev"
|
|
description = "Project host"
|
|
}
|
|
|
|
variable "redis_host" {
|
|
type = string
|
|
default = "redis.smaug.dev"
|
|
description = "Redis host"
|
|
}
|
|
|
|
variable "redis_port" {
|
|
type = string
|
|
default = 6379
|
|
description = "Redis port"
|
|
}
|
|
|
|
variable "redis_password" {
|
|
type = string
|
|
description = "Redis password"
|
|
}
|
|
|