ci/cd - trying to fix race condition for core tests
This commit is contained in:
parent
ed0e156bcb
commit
274a8cdfb9
|
@ -19,6 +19,14 @@ services:
|
|||
# ? ANTIBOT settings
|
||||
USE_ANTIBOT: "no"
|
||||
ANTIBOT_URI: "/challenge"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -14,13 +14,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
if resp.status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -21,6 +21,14 @@ services:
|
|||
AUTH_BASIC_LOCATION: "sitewide"
|
||||
AUTH_BASIC_USER: "bunkerity"
|
||||
AUTH_BASIC_PASSWORD: "Secr3tP@ssw0rd"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -14,13 +14,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code <= 401
|
||||
ready = status_code <= 401 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -21,6 +21,14 @@ services:
|
|||
BAD_BEHAVIOR_BAN_TIME: "86400"
|
||||
BAD_BEHAVIOR_THRESHOLD: "10"
|
||||
BAD_BEHAVIOR_COUNT_TIME: "60"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ready
|
|
@ -13,13 +13,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -37,6 +37,14 @@ services:
|
|||
BLACKLIST_IGNORE_USER_AGENT_URLS: ""
|
||||
BLACKLIST_IGNORE_URI: ""
|
||||
BLACKLIST_IGNORE_URI_URLS: ""
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400 or status_code == 403
|
||||
ready = status_code < 400 or status_code == 403 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -18,6 +18,14 @@ services:
|
|||
|
||||
# ? BROTLI settings
|
||||
USE_BROTLI: "no"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -17,6 +17,14 @@ services:
|
|||
# ? BUNKERNET settings
|
||||
USE_BUNKERNET: "yes"
|
||||
BUNKERNET_SERVER: "http://bunkernet-api:8080"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -15,6 +15,14 @@ services:
|
|||
LOG_LEVEL: "info"
|
||||
USE_REDIS: "yes"
|
||||
REDIS_HOST: "bw-redis"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
- bw-universe
|
||||
|
||||
|
|
|
@ -20,6 +20,14 @@ services:
|
|||
CLIENT_CACHE_EXTENSIONS: "jpg|jpeg|png|bmp|ico|svg|tif|css|js|otf|ttf|eot|woff|woff2"
|
||||
CLIENT_CACHE_ETAG: "yes"
|
||||
CLIENT_CACHE_CONTROL: "public, max-age=15552000"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com/image.png", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -30,6 +30,14 @@ services:
|
|||
CORS_ALLOW_CREDENTIALS: "no"
|
||||
CORS_ALLOW_METHODS: "GET, POST, OPTIONS"
|
||||
CORS_ALLOW_HEADERS: "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -14,18 +14,20 @@ try:
|
|||
ready = False
|
||||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get(
|
||||
f"http{'s' if ssl else ''}://www.example.com",
|
||||
with suppress(RequestException):
|
||||
resp = get(
|
||||
f"http{'s' if ssl else ''}://www.example.com/ready",
|
||||
headers={"Host": "www.example.com"},
|
||||
verify=False,
|
||||
).status_code
|
||||
)
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -18,6 +18,14 @@ services:
|
|||
# ? COUNTRY settings
|
||||
BLACKLIST_COUNTRY: ""
|
||||
WHITELIST_COUNTRY: ""
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-us-network:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400 or status_code == 403
|
||||
ready = status_code < 400 or status_code == 403 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -20,6 +20,14 @@ services:
|
|||
USE_CUSTOM_SSL: "no"
|
||||
CUSTOM_SSL_CERT: "/certs/certificate.pem"
|
||||
CUSTOM_SSL_KEY: "/certs/privatekey.key"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -18,6 +18,14 @@ services:
|
|||
REVERSE_PROXY_URL: "/"
|
||||
LOG_LEVEL: "info"
|
||||
CUSTOM_CONF_MODSEC_test_custom_conf: 'SecRule REQUEST_FILENAME "@rx ^/db" "id:10000,ctl:ruleRemoveByTag=attack-generic,ctl:ruleRemoveByTag=attack-protocol,nolog"'
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -18,6 +18,14 @@ services:
|
|||
# ? DNSBL settings
|
||||
USE_DNSBL: "yes"
|
||||
DNSBL_LIST: ""
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -11,13 +11,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}, timeout=3).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400 or status_code == 403
|
||||
ready = status_code < 400 or status_code == 403 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -19,6 +19,14 @@ services:
|
|||
# ? ERRORS settings
|
||||
ERRORS: ""
|
||||
INTERCEPTED_ERROR_CODES: "400 401 403 404 405 413 429 500 501 502 503 504"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -14,13 +14,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -27,6 +27,14 @@ services:
|
|||
GREYLIST_USER_AGENT_URLS: ""
|
||||
GREYLIST_URI: ""
|
||||
GREYLIST_URI_URLS: ""
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400 or status_code == 403
|
||||
ready = status_code < 400 or status_code == 403 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -18,6 +18,14 @@ services:
|
|||
|
||||
# ? GZIP settings
|
||||
USE_GZIP: "no"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -32,6 +32,14 @@ services:
|
|||
X_FRAME_OPTIONS: "SAMEORIGIN"
|
||||
X_CONTENT_TYPE_OPTIONS: "nosniff"
|
||||
X_XSS_PROTECTION: "1; mode=block"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -12,17 +12,19 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get(
|
||||
f"http{'s' if ssl else ''}://www.example.com",
|
||||
resp = get(
|
||||
f"http{'s' if ssl else ''}://www.example.com/ready",
|
||||
headers={"Host": "www.example.com"},
|
||||
verify=False,
|
||||
).status_code
|
||||
)
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -17,6 +17,14 @@ services:
|
|||
|
||||
# ? INJECT settings
|
||||
INJECT_BODY: "TEST"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -22,6 +22,14 @@ services:
|
|||
LIMIT_REQ_RATE: "2r/s"
|
||||
USE_LIMIT_CONN: "yes"
|
||||
LIMIT_CONN_MAX_HTTP1: "1"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -29,6 +29,14 @@ services:
|
|||
HTTP2: "yes"
|
||||
LISTEN_HTTP: "yes"
|
||||
DENY_HTTP_STATUS: "403"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -21,6 +21,14 @@ services:
|
|||
MODSECURITY_SEC_AUDIT_ENGINE: "RelevantOnly"
|
||||
MODSECURITY_SEC_RULE_ENGINE: "On"
|
||||
MODSECURITY_SEC_AUDIT_LOG_PARTS: "ABCFHZ"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -18,6 +18,14 @@ services:
|
|||
# ? REDIRECT settings
|
||||
REDIRECT_TO: ""
|
||||
REDIRECT_TO_REQUEST_URI: "no"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -12,13 +12,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400
|
||||
ready = status_code < 400 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -29,6 +29,14 @@ services:
|
|||
REDIS_PORT: "6379"
|
||||
REDIS_DATABASE: "0"
|
||||
REDIS_SSL: "no"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -19,6 +19,14 @@ services:
|
|||
USE_REVERSE_SCAN: "yes"
|
||||
REVERSE_SCAN_PORTS: "80"
|
||||
REVERSE_SCAN_TIMEOUT: "500"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -20,6 +20,14 @@ services:
|
|||
GENERATE_SELF_SIGNED_SSL: "no"
|
||||
SELF_SIGNED_SSL_EXPIRY: "365"
|
||||
SELF_SIGNED_SSL_SUBJ: "/CN=www.example.com/"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -19,6 +19,14 @@ services:
|
|||
# ? SESSIONS settings
|
||||
SESSIONS_SECRET: "random"
|
||||
SESSIONS_NAME: "random"
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -30,6 +30,14 @@ services:
|
|||
WHITELIST_USER_AGENT_URLS: ""
|
||||
WHITELIST_URI: ""
|
||||
WHITELIST_URI_URLS: ""
|
||||
CUSTOM_CONF_SERVER_HTTP_ready: |
|
||||
location /ready {
|
||||
default_type 'text/plain';
|
||||
rewrite_by_lua_block {
|
||||
ngx.say('ready')
|
||||
ngx.exit(ngx.HTTP_OK)
|
||||
}
|
||||
}
|
||||
networks:
|
||||
bw-universe:
|
||||
bw-services:
|
||||
|
|
|
@ -10,13 +10,15 @@ try:
|
|||
retries = 0
|
||||
while not ready:
|
||||
with suppress(RequestException):
|
||||
status_code = get("http://www.example.com", headers={"Host": "www.example.com"}).status_code
|
||||
resp = get("http://www.example.com/ready", headers={"Host": "www.example.com"})
|
||||
status_code = resp.status_code
|
||||
text = resp.text
|
||||
|
||||
if status_code >= 500:
|
||||
print("❌ An error occurred with the server, exiting ...", flush=True)
|
||||
exit(1)
|
||||
|
||||
ready = status_code < 400 or status_code == 403
|
||||
ready = status_code < 400 or status_code == 403 and text == "ready"
|
||||
|
||||
if retries > 10:
|
||||
print("❌ The service took too long to be ready, exiting ...", flush=True)
|
||||
|
|
|
@ -15,7 +15,7 @@ resource "scaleway_k8s_cluster" "cluster" {
|
|||
version = "1.24.7"
|
||||
cni = "cilium"
|
||||
private_network_id = scaleway_vpc_private_network.pn.id
|
||||
delete_additional_resources = false
|
||||
delete_additional_resources = true
|
||||
}
|
||||
# Create k8s pool
|
||||
resource "scaleway_k8s_pool" "pool" {
|
||||
|
|
|
@ -2,7 +2,7 @@ terraform {
|
|||
required_providers {
|
||||
scaleway = {
|
||||
source = "scaleway/scaleway"
|
||||
version = "2.30.0"
|
||||
version = "2.31.0"
|
||||
}
|
||||
kubectl = {
|
||||
source = "gavinbunney/kubectl"
|
||||
|
|
Loading…
Reference in New Issue