WIP radicale

This commit is contained in:
Nemo 2017-12-30 23:12:23 +05:30
parent d8f7634777
commit 1af276db81
5 changed files with 15 additions and 15 deletions

View File

@ -45,6 +45,7 @@ resource "docker_image" "wikijs" {
# Attempting to use mongorocks to work around reboot issue
# Hoping that this will not face reboot-recovery issues
# Wrote about this: https://captnemo.in/blog/2017/12/18/home-server-learnings/
resource "docker_image" "mongorocks" {
name = "${data.docker_registry_image.mongorocks.name}"
pull_triggers = ["${data.docker_registry_image.mongorocks.sha256_digest}"]
@ -66,6 +67,7 @@ resource "docker_image" "ubooquity" {
}
# Helps debug traefik reverse proxy headers
# Highly recommended!
resource "docker_image" "headerdebug" {
name = "${data.docker_registry_image.headerdebug.name}"
pull_triggers = ["${data.docker_registry_image.headerdebug.sha256_digest}"]

View File

@ -26,4 +26,5 @@ module "docker" {
module "radicale" {
source ="radicale"
domain = "radicale.bb8.fun"
}

View File

@ -3,15 +3,11 @@
# Create a Database
resource "mysql_database" "lychee" {
name = "lychee"
lifecycle {
prevent_destroy = true
}
}
resource "mysql_user" "lychee" {
user = "lychee"
host = "${var.lychee_ip}"
host = "%"
plaintext_password = "${var.mysql_lychee_password}"
}

View File

@ -61,10 +61,10 @@ dns_lookup = False
[encoding]
# Encoding for responding requests
#request = utf-8
request = utf-8
# Encoding for storing local collections
#stock = utf-8
stock = utf-8
[auth]
@ -83,7 +83,7 @@ dns_lookup = False
#htpasswd_encryption = bcrypt
# Incorrect authentication delay (seconds)
#delay = 1
delay = 1
[rights]
@ -93,7 +93,7 @@ dns_lookup = False
#type = owner_only
# File for rights management from_file
#file = /etc/radicale/rights
# file = /etc/radicale/rights
[storage]

View File

@ -19,6 +19,8 @@ resource docker_container "radicale" {
"traefik.frontend.headers.STSIncludeSubdomains" = "false"
"traefik.frontend.headers.contentTypeNosniff" = "true"
"traefik.frontend.headers.browserXSSFilter" = "true"
"traefik.frontend.passHostHeader" = "true"
"traefik.frontend.rule" = "Host:${var.domain}"
}
volumes {
@ -29,7 +31,6 @@ resource docker_container "radicale" {
volumes {
host_path = "/mnt/xwing/config/radicale"
container_path = "/config"
read_only = true
}
upload {
@ -37,11 +38,11 @@ resource docker_container "radicale" {
file = "/config/config"
}
env = [
"PGID=1003",
"PUID=1000",
"TZ=Asia/Kolkata",
]
# env = [
# "PGID=1003",
# "PUID=1000",
# "TZ=Asia/Kolkata",
# ]
restart = "unless-stopped"
destroy_grace_seconds = 10