Nomad
NextCloud
@hashicorp
NextCloud
- Community
- Pack
Updated 2 years ago
- GitHub(opens in new tab)
NextCloud
Nextcloud is a suite of software for productivity and file management.
It is community-driven, free, and open source. It can be thought of as an OSS GSuite.
This Pack contains a Nomad job to deploy a task with the Nextcloud server. Optionally, it includes two additional tasks to host a postgres database with the Nextcloud on the same client node.
Dependencies
This pack requires Linux clients to run properly.
If you choose to use "services", configurable via variables, Consul is required.
Variables
Name | Description | Type | Default | Required |
---|---|---|---|---|
job_name | The name to use as the job name which overrides using the pack name. | string | "" | no |
namespace | The namespace where the job should be placed. | string | "default" | no |
datacenters | A list of datacenters in the region which are eligible for task placement. | list(string) | [ "dc1"] | no |
region | The region where the job should be placed. | string | "global" | no |
nextcloud_image_tag | The docker image tag. For options, see https://hub.docker.com/_/nextcloud | string | "latest" | no |
postgres_image_tag | Tag for postgres image For options, see https://hub.docker.com/_/postgres | string | "9.6.14" | no |
constraints | Constraints to apply to the entire job. | list(object({ attribute = string operator = string value = string })) | [ { "attribute": "${attr.kernel.name}", "operator": "=", "value": "linux" }] | no |
network | The group network configuration options. | object({ mode = string ports = list(object({ name = string to = number static = number })) }) | { "mode": "bridge", "ports": [ { "name": "http", "static": 4001, "to": 80 }, { "name": "db", "static": 5432, "to": 5432 } ]} | no |
app_service | Configuration for the application service. | object({ service_port_label = string service_name = string service_tags = list(string) check_enabled = bool check_type = string check_path = string check_interval = string check_timeout = string upstreams = list(object({ name = string port = number })) }) | null | no |
db_service | Configuration for the database service. | object({ service_port_label = string service_name = string service_tags = list(string) check_enabled = bool check_type = string check_path = string check_interval = string check_timeout = string upstreams = list(object({ name = string port = number })) }) | { "check_enabled": true, "check_interval": "30s", "check_path": "", "check_timeout": "2s", "check_type": "tcp", "service_name": "nextcloud-db", "service_port_label": "db", "service_tags": [ "postgres" ], "upstreams": []} | no |
app_resources | The resource to assign to the NextCloud app task. | object({ cpu = number memory = number }) | { "cpu": 500, "memory": 2048} | no |
db_resources | The resource to assign to the NextCloud app task. | object({ cpu = number memory = number }) | { "cpu": 100, "memory": 512} | no |
container_args | Arguments to pass to the Nextcloud container | list(string) | [] | no |
env_vars | Nextcloud environment variables. | list(object({ key = string value = string })) | [ { "key": "NEXTCLOUD_ADMIN_USER", "value": "admin" }, { "key": "NEXTCLOUD_ADMIN_PASSWORD", "value": "password" }, { "key": "NEXTCLOUD_DATA_DIR", "value": "/var/www/html/data" }] | no |
db_env_vars | Nextcloud environment variables. | list(object({ key = string value = string })) | [ { "key": "POSTGRES_DB", "value": "nextcloud" }, { "key": "POSTGRES_USER", "value": "nextcloud" }, { "key": "POSTGRES_PASSWORD", "value": "password" }, { "key": "POSTGRES_HOST", "value": "localhost" }] | no |
app_mounts | Mounts that are configured when using the default NextCloud configuration | list(object({ type = string source = string target = string readonly = bool bind_options = list(object({ name = string value = string })) })) | [ { "bind_options": [], "readonly": false, "source": "/var/nextcloud/html/data", "target": "/var/www/html/", "type": "bind" }] | no |
postgres_mounts | password for postgres database | list(object({ type = string source = string target = string readonly = bool bind_options = list(object({ name = string value = string })) })) | [ { "bind_options": [], "readonly": false, "source": "/var/nextcloud/postgresql/data", "target": "/var/lib/postgresql/data", "type": "bind" }] | no |
include_database_task | Whether or not to include a db task. If using a remote database, this should be false. | bool | true | no |
prestart_directory_creation | Whether or not to launch a prestart task to create volume directories on the host. | bool | true | no |
db_volume_source_path | Volume path on the host machine used for database data | string | "/var/nextcloud/postgresql/data" | no |
app_data_source_path | Volume path on the host machine used for nextcloud application data | string | "/var/nextcloud/html/data" | no |