Browse Source

Upgrades and stuff

monicahq
Nemo 3 years ago
parent
commit
8efb575290
  1. 5
      _scripts/ubooquity.php
  2. 2
      docker/data.tf
  3. 36
      docker/got.tf
  4. 1
      docker/network.tf
  5. 17
      mysql/airsonic.tf
  6. 16
      mysql/lychee.tf
  7. 2
      providers.tf

5
_scripts/ubooquity.php

@ -0,0 +1,5 @@
<?php
// Generates the Ubooquity preferences.json file
$template = "ubooquity.tpl.json";

2
docker/data.tf

@ -11,7 +11,7 @@ data "docker_registry_image" "percona-mongodb-server" {
data "docker_registry_image" "traefik" {
# Critical and I like upgrading it
# for updating config for new features
name = "traefik:1.6.0-rc5-alpine"
name = "traefik:1.6-alpine"
}
# YOLO everything else

36
docker/got.tf

@ -2,22 +2,26 @@ data "docker_registry_image" "gotviz" {
name = "tocttou/gotviz:latest"
}
resource "docker_image" "gotviz" {
name = "${data.docker_registry_image.gotviz.name}"
pull_triggers = ["${data.docker_registry_image.gotviz.sha256_digest}"]
}
# resource "docker_image" "gotviz" {
# name = "${data.docker_registry_image.gotviz.name}"
# pull_triggers = ["${data.docker_registry_image.gotviz.sha256_digest}"]
# }
resource "docker_container" "gotviz" {
name = "gotviz"
image = "${docker_image.gotviz.latest}"
labels = "${merge(
local.traefik_common_labels, map(
"traefik.port", 8080,
"traefik.frontend.rule","Host:got-relationships.${var.domain}"
))}"
# resource "docker_container" "gotviz" {
# name = "gotviz"
# image = "${docker_image.gotviz.latest}"
# labels = "${merge(
# local.traefik_common_labels, map(
# "traefik.port", 8080,
# "traefik.frontend.rule","Host:got-relationships.${var.domain}"
# ))}"
# restart = "unless-stopped"
# destroy_grace_seconds = 60
# must_run = true
# }
restart = "unless-stopped"
destroy_grace_seconds = 60
must_run = true
}

1
docker/network.tf

@ -0,0 +1 @@

17
mysql/main.tf → mysql/airsonic.tf

@ -1,20 +1,3 @@
resource "mysql_database" "lychee" {
name = "lychee"
}
resource "mysql_user" "lychee" {
user = "lychee"
host = "%"
plaintext_password = "${var.mysql_lychee_password}"
}
resource "mysql_grant" "lychee" {
user = "${mysql_user.lychee.user}"
host = "${mysql_user.lychee.host}"
database = "${mysql_database.lychee.name}"
privileges = ["ALL"]
}
resource "mysql_database" "airsonic" {
name = "airsonic"
}

16
mysql/lychee.tf

@ -0,0 +1,16 @@
resource "mysql_database" "lychee" {
name = "lychee"
}
resource "mysql_user" "lychee" {
user = "lychee"
host = "%"
plaintext_password = "${var.mysql_lychee_password}"
}
resource "mysql_grant" "lychee" {
user = "${mysql_user.lychee.user}"
host = "${mysql_user.lychee.host}"
database = "${mysql_database.lychee.name}"
privileges = ["ALL"]
}

2
providers.tf

@ -14,6 +14,6 @@ provider "mysql" {
password = "${var.mysql_root_password}"
}
provider digitalocean {
provider "digitalocean" {
token = "${var.digitalocean-token}"
}
Loading…
Cancel
Save