Don't use opinionated.tf while inside opinionated.tf modules.
This commit is contained in:
parent
c96f6e5bd7
commit
06835f9030
8 changed files with 15 additions and 10 deletions
docker/socket-proxy
products
forgejo/forgejo
portainer/ui
socket-proxy
|
@ -1,10 +1,10 @@
|
||||||
module "network" {
|
module "network" {
|
||||||
source = "github.com/matthewbaggett/terraform_modules//docker/network"
|
source = "../../docker/network"
|
||||||
network_name = "docker-socket-proxy"
|
network_name = "docker-socket-proxy"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
}
|
}
|
||||||
module "service" {
|
module "service" {
|
||||||
source = "github.com/matthewbaggett/terraform_modules//docker/service"
|
source = "../../docker/service"
|
||||||
image = "${var.docker_socket_proxy_image}:${var.docker_socket_proxy_version}"
|
image = "${var.docker_socket_proxy_image}:${var.docker_socket_proxy_version}"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
service_name = var.service_name
|
service_name = var.service_name
|
||||||
|
|
|
@ -4,7 +4,7 @@ module "postgres" {
|
||||||
placement_constraints = var.placement_constraints
|
placement_constraints = var.placement_constraints
|
||||||
postgres_version = "15"
|
postgres_version = "15"
|
||||||
networks = [module.forgejo_network]
|
networks = [module.forgejo_network]
|
||||||
data_persist_path = "/fast/gitea/db"
|
data_persist_path = var.database_storage_path
|
||||||
ports = [
|
ports = [
|
||||||
{
|
{
|
||||||
host = 62800
|
host = 62800
|
||||||
|
|
|
@ -21,8 +21,9 @@ module "forgejo" {
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
mounts = merge(var.mounts, {
|
mounts = merge(var.mounts, {
|
||||||
"/etc/timezone" = "/etc/timezone",
|
"${var.data_storage_path}" = "/data",
|
||||||
"/etc/localtime" = "/etc/localtime",
|
"/etc/timezone" = "/etc/timezone",
|
||||||
|
"/etc/localtime" = "/etc/localtime",
|
||||||
})
|
})
|
||||||
environment_variables = {
|
environment_variables = {
|
||||||
USER_UID = 1000
|
USER_UID = 1000
|
||||||
|
|
|
@ -60,6 +60,11 @@ variable "mounts" {
|
||||||
description = "A map of host paths to container paths to mount. Key is Host path, Value is Container path"
|
description = "A map of host paths to container paths to mount. Key is Host path, Value is Container path"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "data_storage_path" {
|
||||||
|
type = string
|
||||||
|
description = "Specify path to store the data."
|
||||||
|
default = null
|
||||||
|
}
|
||||||
variable "database_storage_path" {
|
variable "database_storage_path" {
|
||||||
type = string
|
type = string
|
||||||
description = "Specify path to store the database data."
|
description = "Specify path to store the database data."
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module "docker_socket_proxy" {
|
module "docker_socket_proxy" {
|
||||||
source = "github.com/matthewbaggett/terraform_modules//docker/socket-proxy"
|
source = "../../../docker/socket-proxy"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
enable_all = true
|
enable_all = true
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
module "portainer_network" {
|
module "portainer_network" {
|
||||||
source = "github.com/matthewbaggett/terraform_modules//docker/network"
|
source = "../../../docker/network"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
network_name = "portainer"
|
network_name = "portainer"
|
||||||
}
|
}
|
|
@ -9,12 +9,12 @@ resource "htpasswd_password" "hash" {
|
||||||
salt = random_password.salt.result
|
salt = random_password.salt.result
|
||||||
}
|
}
|
||||||
module "vol_portainer" {
|
module "vol_portainer" {
|
||||||
source = "github.com/matthewbaggett/terraform_modules//docker//volume"
|
source = "../../../docker//volume"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
volume_name = "portainer"
|
volume_name = "portainer"
|
||||||
}
|
}
|
||||||
module "portainer" {
|
module "portainer" {
|
||||||
source = "github.com/matthewbaggett/terraform_modules//docker//service"
|
source = "../../../docker//service"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
service_name = "portainer"
|
service_name = "portainer"
|
||||||
image = "portainer/portainer-ce:${var.portainer_version}"
|
image = "portainer/portainer-ce:${var.portainer_version}"
|
||||||
|
|
|
@ -4,7 +4,6 @@ locals {
|
||||||
command = ["socat", local.listen, local.connect]
|
command = ["socat", local.listen, local.connect]
|
||||||
}
|
}
|
||||||
module "socat" {
|
module "socat" {
|
||||||
#source = "github.com/matthewbaggett/terraform_modules//docker/service"
|
|
||||||
source = "../../docker/service"
|
source = "../../docker/service"
|
||||||
stack_name = var.stack_name
|
stack_name = var.stack_name
|
||||||
service_name = var.service_name
|
service_name = var.service_name
|
||||||
|
|
Loading…
Reference in a new issue