Simplify configuration

This commit is contained in:
Quentin 2020-10-28 12:08:23 +01:00
parent f4a88fa565
commit 2ef6ab1881
4 changed files with 55 additions and 88 deletions

View file

@ -1,33 +0,0 @@
# Blacklist everything cleverly
*
!*/
# Whitelist some patterns
!*.sample
!*.gen
!*.tpl
!.gitignore
# Whitelist specific files
!seafile/conf/seafdav.conf
!seafile/ccnet/seafile.ini
!email/dkim/keytable
!email/dkim/signingtable
!email/dkim/trusted
!email/postfix/dynamicmaps.cf
!email/postfix/header_checks
!email/postfix/main.cf
!email/postfix/master.cf
!email/postfix/transport
!email/postfix/transport.db
!email/sogo/sogo.conf.tpl
!chat/**/*
!plume/**/*
!directory/*/*
!traefik/traefik.toml
!garage/config.toml

View file

@ -0,0 +1,21 @@
block_size = 1048576
metadata_dir = "/garage/meta"
data_dir = "/garage/data"
rpc_bind_addr = "[::]:3901"
consul_host = "consul.service.2.cluster.deuxfleurs.fr:8500"
consul_service_name = "garage-rpc"
bootstrap_peers = [ ]
[rpc_tls]
ca_cert = "/garage/garage-ca.crt"
node_cert = "/garage/garage.crt"
node_key = "/garage/garage.key"
[s3_api]
s3_region = "garage"
api_bind_addr = "[::]:3900"

View file

@ -12,10 +12,7 @@ job "garage" {
driver = "docker" driver = "docker"
config { config {
image = "lxpz/garage_amd64:4" image = "lxpz/garage_amd64:4"
port_map { network_mode = "host"
rpc_port = 3901
api_port = 3900
}
volumes = [ volumes = [
"/mnt/storage/garage/data:/garage/data", "/mnt/storage/garage/data:/garage/data",
"/mnt/ssd/garage/meta:/garage/meta", "/mnt/ssd/garage/meta:/garage/meta",
@ -46,12 +43,6 @@ job "garage" {
resources { resources {
memory = 500 memory = 500
cpu = 1000 cpu = 1000
network {
port "rpc_port" {
static = "3901"
}
port "api_port" {}
}
} }
service { service {
@ -61,12 +52,13 @@ job "garage" {
"traefik.frontend.entryPoints=https,http", "traefik.frontend.entryPoints=https,http",
"traefik.frontend.rule=Host:garage.deuxfleurs.fr" "traefik.frontend.rule=Host:garage.deuxfleurs.fr"
] ]
port = "api_port" port = 3900
address_mode = "host" address_mode = "driver"
name = "garage-api" name = "garage-api"
check { check {
type = "tcp" type = "tcp"
port = "api_port" port = 3900
address_mode = "driver"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { check_restart {
@ -79,12 +71,13 @@ job "garage" {
service { service {
tags = ["garage-rpc"] tags = ["garage-rpc"]
port = "rpc_port" port = 3901
address_mode = "host" address_mode = "driver"
name = "garage-rpc" name = "garage-rpc"
check { check {
type = "tcp" type = "tcp"
port = "rpc_port" port = 3901
address_mode = "driver"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"
check_restart { check_restart {

View file

@ -9,11 +9,7 @@ job "frontend" {
config { config {
image = "amd64/traefik:1.7.20" image = "amd64/traefik:1.7.20"
readonly_rootfs = true readonly_rootfs = true
port_map { network_mode = "host"
https_port = 443
http_port = 80
adm_port = 8082
}
volumes = [ volumes = [
"secrets/traefik.toml:/etc/traefik/traefik.toml", "secrets/traefik.toml:/etc/traefik/traefik.toml",
] ]
@ -21,17 +17,6 @@ job "frontend" {
resources { resources {
memory = 265 memory = 265
network {
port "https_port" {
static = "443"
}
port "http_port" {
static = "80"
}
port "adm_port" {
static = "8082"
}
}
} }
service { service {
@ -40,13 +25,14 @@ job "frontend" {
"frontend", "frontend",
"(diplonat (tcp_port 80 443))" "(diplonat (tcp_port 80 443))"
] ]
port = "https_port" port = 443
address_mode = "host" address_mode = "driver"
name = "traefik" name = "traefik"
check { check {
type = "http" type = "http"
protocol = "http" protocol = "http"
port = "adm_port" port = 8082
address_mode = "driver"
path = "/ping" path = "/ping"
interval = "60s" interval = "60s"
timeout = "5s" timeout = "5s"