Changing IP name convention in firewall rules defintions

This commit is contained in:
2022-09-27 06:35:27 +00:00
parent 6256ed68a1
commit 1e657cd80b
4 changed files with 23 additions and 156 deletions

View File

@@ -1,59 +0,0 @@
{
"main": {
"SERVICE_NAME": "firewalls",
"DOMAIN": "null"
},
"containers": [
{
"IMAGE": "registry.format.hu/firewall",
"NAME": "firewall",
"MEMORY": "64M",
"IP": "null",
"NETWORK": "host",
"SCALE": "0",
"VOLUMES": [
{
"SOURCE": "/run/",
"DEST": "/run/",
"TYPE": "rw"
},
{
"SOURCE": "/etc/user/config/services",
"DEST": "/services",
"TYPE": "ro"
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
},
{
"SOURCE": "/usr/bin/docker",
"DEST": "/usr/bin/docker",
"TYPE": "ro"
}
],
"PORTS": [ ],
"READYNESS": [
{"tcp": ""},
{"HTTP": ""},
{"EXEC": "/ready.sh"}
],
"ENVS": [
{ "CHAIN": "DOCKER-USER" },
{ "SOURCE": "smarthost_loadbalancer" },
{ "TARGET": "smarthost_backend1" },
{ "TYPE": "tcp" },
{ "TARGET_PORT_1": "80" },
{ "TARGET_PORT_2": "443" },
{ "COMMENT": "smarthost-backend1" }
],
"EXTRA": "--privileged --rm",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": "null"
}
]
}

View File

@@ -1,59 +0,0 @@
{
"main": {
"SERVICE_NAME": "firewalls",
"DOMAIN": "null"
},
"containers": [
{
"IMAGE": "registry.format.hu/firewall",
"NAME": "firewall",
"MEMORY": "64M",
"IP": "null",
"NETWORK": "host",
"SCALE": "0",
"VOLUMES": [
{
"SOURCE": "/run/",
"DEST": "/run/",
"TYPE": "rw"
},
{
"SOURCE": "/etc/user/config/services",
"DEST": "/services",
"TYPE": "ro"
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
},
{
"SOURCE": "/usr/bin/docker",
"DEST": "/usr/bin/docker",
"TYPE": "ro"
}
],
"PORTS": [ ],
"READYNESS": [
{"tcp": ""},
{"HTTP": ""},
{"EXEC": "/ready.sh"}
],
"ENVS": [
{ "CHAIN": "DOCKER-USER" },
{ "SOURCE": "smarthost_loadbalancer" },
{ "TARGET": "smarthost_backend2" },
{ "TYPE": "tcp" },
{ "TARGET_PORT_1": "80" },
{ "TARGET_PORT_2": "443" },
{ "COMMENT": "smarthost-backend2" }
],
"EXTRA": "--privileged --rm",
"DEPEND": "null",
"START_ON_BOOT": "false",
"CMD": "null",
"PRE_START": "null",
"POST_START": "null"
}
]
}

View File

@@ -21,7 +21,17 @@
"SOURCE": "/etc/user/config/services",
"DEST": "/services",
"TYPE": "ro"
}
},
{
"SOURCE": "/var/run/docker.sock",
"DEST": "/var/run/docker.sock",
"TYPE": "rw"
},
{
"SOURCE": "/usr/bin/docker",
"DEST": "/usr/bin/docker",
"TYPE": "ro"
}
],
"PORTS": [ ],
"READYNESS": [
@@ -29,39 +39,14 @@
{"HTTP": ""},
{"EXEC": "/ready.sh"}
],
"ENVS": [
{
"NAME": "CHAIN",
"VALUE": "DOCKER-USER"
},
{
"NAME": "SOURCE_IP_1",
"VALUE": "172.18.101.2"
},
{
"NAME": "SOURCE_IP_2",
"VALUE": "172.18.102.2"
},
{
"NAME": "TARGET_IP",
"VALUE": "172.18.103.2"
},
{
"NAME": "TYPE",
"VALUE": "tcp"
},
{
"NAME": "TARGET_PORT_1",
"VALUE": "80"
},
{
"NAME": "TARGET_PORT_2",
"VALUE": "443"
},
{
"NAME": "COMMENT",
"VALUE": "27dhuwth"
}
"ENVS": [
{ "CHAIN": "DOCKER-USER" },
{ "SOURCE": "public_backend" },
{ "TARGET": "smarthost_loadbalancer" },
{ "TYPE": "tcp" },
{ "TARGET_PORT_1": "80" },
{ "TARGET_PORT_2": "443" },
{ "COMMENT": "public-smarthost" }
],
"EXTRA": "--privileged --rm",
"DEPEND": "null",

View File

@@ -73,7 +73,7 @@
},
{
"IMAGE": "registry.format.hu/nginx:1.21",
"NAME": "smarthost_backend1-zc93hhth",
"NAME": "smarthost_backend-1",
"ROLES": "smarthost-backend-proxy",
"MEMORY": "64M",
"IP": "172.18.104.2",
@@ -117,11 +117,11 @@
"START_ON_BOOT": "true",
"CMD": "null",
"PRE_START": "null",
"POST_START": [ "firewall-backend1" ]
"POST_START": [ "firewall-backend" ]
},
{
"IMAGE": "registry.format.hu/nginx:1.21",
"NAME": "smarthost_backend2-g4rg38th",
"NAME": "smarthost_backend-2",
"ROLES": "smarthost-backend-proxy",
"MEMORY": "64M",
"IP": "172.18.105.2",
@@ -165,7 +165,7 @@
"START_ON_BOOT": "true",
"CMD": "null",
"PRE_START": "null",
"POST_START": [ "firewall-backend2" ]
"POST_START": [ "firewall-backend" ]
}
]
}