Add mealie to Terraform
This commit is contained in:
parent
96a376a917
commit
ac1a77cf85
8
services/mealie/Taskfile.dist.yml
Normal file
8
services/mealie/Taskfile.dist.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
includes:
|
||||||
|
tf:
|
||||||
|
vars:
|
||||||
|
SERVICE: "mealie"
|
||||||
|
ENVIRONMENT: "main"
|
||||||
|
taskfile: ../../taskfiles/Taskfile_service.dist.yml
|
28
services/mealie/_common/main.tf
Normal file
28
services/mealie/_common/main.tf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
resource "docker_container" "mealie" {
|
||||||
|
image = "ghcr.io/mealie-recipes/mealie:${var.mealie_version}"
|
||||||
|
name = var.container_name
|
||||||
|
|
||||||
|
restart = "always"
|
||||||
|
|
||||||
|
env = [
|
||||||
|
"TZ=Europe/Stockholm",
|
||||||
|
"ALLOW_SIGNUP=false",
|
||||||
|
"BASE_URL=https://mealie.layla.gg",
|
||||||
|
"PUID=1000",
|
||||||
|
"PGID=1000",
|
||||||
|
]
|
||||||
|
|
||||||
|
ports {
|
||||||
|
internal = 9000
|
||||||
|
external = 9925
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mounts {
|
||||||
|
target = "/app/data"
|
||||||
|
source = "/volume1/cloud/${var.container_name}/data"
|
||||||
|
read_only = false
|
||||||
|
type = "bind"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
10
services/mealie/_common/vars.tf
Normal file
10
services/mealie/_common/vars.tf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
variable "mealie_version" {
|
||||||
|
description = "Container tag"
|
||||||
|
type = string
|
||||||
|
default = "1"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "container_name" {
|
||||||
|
description = "Container name"
|
||||||
|
type = string
|
||||||
|
}
|
7
services/mealie/_common/versions.tf
Normal file
7
services/mealie/_common/versions.tf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
docker = {
|
||||||
|
source = "kreuzwerker/docker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
6
services/mealie/main/main.tf
Normal file
6
services/mealie/main/main.tf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
module "mealie" {
|
||||||
|
source = "../_common"
|
||||||
|
|
||||||
|
container_name = "mealie"
|
||||||
|
mealie_version = "v1.0.0-RC1.1"
|
||||||
|
}
|
7
services/mealie/main/versions.tf
Normal file
7
services/mealie/main/versions.tf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
terraform {
|
||||||
|
required_providers {
|
||||||
|
docker = {
|
||||||
|
source = "kreuzwerker/docker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user