~damien/infrastructure

ref: b481ba41c3bbdf8d4f9c0393f87b495160adc414 infrastructure/jobs/owncloud.nomad -rw-r--r-- 1.5 KiB
b481ba41 — Damien Radtke Suppress cluster env output if non-interactive 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
job "owncloud" {
	region = "us"

	datacenters = ["us-central"]
	type = "service"

	constraint {
		attribute = "${meta.owncloud_mounted}"
		value = "true"
	}

	group "own-cloud" {
		count = 1

			task "server" {
				driver = "docker"
				config {
					image = "owncloud/server:10.2"
					volumes = [
						"/mnt/owncloud:/mnt/data",
					]

					port_map {
						http = 8080
					}
				}

				service {
					name = "${JOB}-${TASK}"
					port = "http"
				}

				resources {
					network {
						port "http" {}
					}
				}

				env {
					OWNCLOUD_ADMIN_USERNAME = "admin"
					OWNCLOUD_ADMIN_PASSWORD = "password"
				}
			}
	}

	//group "certrenewer" {
	//	count = 1

	//	task "certrenewer" {
	//		driver = "exec"
	//		config {
	//			command = "cert-renewer"
	//			args = [
	//				"--frequency=24h",
	//				"--balancer=damienradtkecom",
	//				"--domain=damienradtke.com",
	//				"--email=me@damienradtke.com",
	//				"--port=${NOMAD_PORT_http}",
	//				"--cache-dir=${NOMAD_SECRETS_DIR}",
	//				"--linode-token=${CERTRENEWER_TOKEN}",
	//				"--production",
	//				"--init",
	//			]
	//		}

	//		service {
	//			name = "${JOB}-${TASK}"
	//			port = "http"
	//		}

	//		resources {
	//			cpu = 20  # MHz, the minimum value
	//			memory = 20  # MB
	//			network {
	//				port "http" {}
	//			}
	//		}

	//		artifact {
	//			source = "https://github.com/dradtke/linode-certrenewer/releases/download/v0.1.0/cert-renewer"
	//			options {
	//				checksum = "sha256:295224e5135e7c2688d1ede7e253a36ed9178aaafa38771e1914d6f4e48cb449"
	//			}
	//		}
	//	}
	//}
}