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" {
|
||||
source = "github.com/matthewbaggett/terraform_modules//docker/network"
|
||||
source = "../../docker/network"
|
||||
network_name = "docker-socket-proxy"
|
||||
stack_name = var.stack_name
|
||||
}
|
||||
module "service" {
|
||||
source = "github.com/matthewbaggett/terraform_modules//docker/service"
|
||||
source = "../../docker/service"
|
||||
image = "${var.docker_socket_proxy_image}:${var.docker_socket_proxy_version}"
|
||||
stack_name = var.stack_name
|
||||
service_name = var.service_name
|
||||
|
|
|
@ -4,7 +4,7 @@ module "postgres" {
|
|||
placement_constraints = var.placement_constraints
|
||||
postgres_version = "15"
|
||||
networks = [module.forgejo_network]
|
||||
data_persist_path = "/fast/gitea/db"
|
||||
data_persist_path = var.database_storage_path
|
||||
ports = [
|
||||
{
|
||||
host = 62800
|
||||
|
|
|
@ -21,8 +21,9 @@ module "forgejo" {
|
|||
}))
|
||||
}
|
||||
mounts = merge(var.mounts, {
|
||||
"/etc/timezone" = "/etc/timezone",
|
||||
"/etc/localtime" = "/etc/localtime",
|
||||
"${var.data_storage_path}" = "/data",
|
||||
"/etc/timezone" = "/etc/timezone",
|
||||
"/etc/localtime" = "/etc/localtime",
|
||||
})
|
||||
environment_variables = {
|
||||
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"
|
||||
}
|
||||
|
||||
variable "data_storage_path" {
|
||||
type = string
|
||||
description = "Specify path to store the data."
|
||||
default = null
|
||||
}
|
||||
variable "database_storage_path" {
|
||||
type = string
|
||||
description = "Specify path to store the database data."
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module "docker_socket_proxy" {
|
||||
source = "github.com/matthewbaggett/terraform_modules//docker/socket-proxy"
|
||||
source = "../../../docker/socket-proxy"
|
||||
stack_name = var.stack_name
|
||||
enable_all = true
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
module "portainer_network" {
|
||||
source = "github.com/matthewbaggett/terraform_modules//docker/network"
|
||||
source = "../../../docker/network"
|
||||
stack_name = var.stack_name
|
||||
network_name = "portainer"
|
||||
}
|
|
@ -9,12 +9,12 @@ resource "htpasswd_password" "hash" {
|
|||
salt = random_password.salt.result
|
||||
}
|
||||
module "vol_portainer" {
|
||||
source = "github.com/matthewbaggett/terraform_modules//docker//volume"
|
||||
source = "../../../docker//volume"
|
||||
stack_name = var.stack_name
|
||||
volume_name = "portainer"
|
||||
}
|
||||
module "portainer" {
|
||||
source = "github.com/matthewbaggett/terraform_modules//docker//service"
|
||||
source = "../../../docker//service"
|
||||
stack_name = var.stack_name
|
||||
service_name = "portainer"
|
||||
image = "portainer/portainer-ce:${var.portainer_version}"
|
||||
|
|
|
@ -4,7 +4,6 @@ locals {
|
|||
command = ["socat", local.listen, local.connect]
|
||||
}
|
||||
module "socat" {
|
||||
#source = "github.com/matthewbaggett/terraform_modules//docker/service"
|
||||
source = "../../docker/service"
|
||||
stack_name = var.stack_name
|
||||
service_name = var.service_name
|
||||
|
|
Loading…
Reference in a new issue