mirror of
https://gitgud.io/fatchan/haproxy-protection.git
synced 2025-05-09 02:05:37 +00:00
Test with updated dataplaneapi for map fix and exclusing backends in sync, change to .yml, and empty backends map
This commit is contained in:
@ -8,11 +8,12 @@ services:
|
|||||||
- 443:80
|
- 443:80
|
||||||
- 2001:2001 #dataplaneapi
|
- 2001:2001 #dataplaneapi
|
||||||
build:
|
build:
|
||||||
|
# no_cache: true
|
||||||
context: ./
|
context: ./
|
||||||
dockerfile: haproxy/Dockerfile
|
dockerfile: haproxy/Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- ./haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg
|
- ./haproxy/haproxy.cfg:/etc/haproxy/haproxy.cfg
|
||||||
- ./haproxy/dataplaneapi.hcl:/etc/haproxy/dataplaneapi.hcl
|
#- ./haproxy/dataplaneapi.yml:/etc/haproxy/dataplaneapi.yml
|
||||||
- ./haproxy/errors/:/etc/haproxy/errors/
|
- ./haproxy/errors/:/etc/haproxy/errors/
|
||||||
- ./haproxy/map/:/etc/haproxy/map/
|
- ./haproxy/map/:/etc/haproxy/map/
|
||||||
- ./haproxy/template/:/etc/haproxy/template/
|
- ./haproxy/template/:/etc/haproxy/template/
|
||||||
@ -20,6 +21,7 @@ services:
|
|||||||
- ./src/lua/libs/:/etc/haproxy/libs/
|
- ./src/lua/libs/:/etc/haproxy/libs/
|
||||||
- ./src/js/:/etc/haproxy/js/
|
- ./src/js/:/etc/haproxy/js/
|
||||||
- ./src/locales/:/etc/haproxy/locales/
|
- ./src/locales/:/etc/haproxy/locales/
|
||||||
|
- ../../Documents/dataplaneapi/build/dataplaneapi:/usr/local/bin/dataplaneapi
|
||||||
environment:
|
environment:
|
||||||
# These are the hcaptcha and recaptcha test keys, not leaking any dont worry :^)
|
# These are the hcaptcha and recaptcha test keys, not leaking any dont worry :^)
|
||||||
- HCAPTCHA_SITEKEY=20000000-ffff-ffff-ffff-000000000002
|
- HCAPTCHA_SITEKEY=20000000-ffff-ffff-ffff-000000000002
|
||||||
|
@ -38,11 +38,11 @@ RUN set -eux; \
|
|||||||
luarocks \
|
luarocks \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
\
|
# \
|
||||||
wget -O dataplaneapi_Linux_x86_64.tar.gz "$DATAPLANEAPI_URL"; \
|
# wget -O dataplaneapi_Linux_x86_64.tar.gz "$DATAPLANEAPI_URL"; \
|
||||||
tar -zxvf dataplaneapi_Linux_x86_64.tar.gz; \
|
# tar -zxvf dataplaneapi_Linux_x86_64.tar.gz; \
|
||||||
chmod +x build/dataplaneapi; \
|
# chmod +x build/dataplaneapi; \
|
||||||
cp build/dataplaneapi /usr/local/bin/; \
|
# cp build/dataplaneapi /usr/local/bin/; \
|
||||||
\
|
\
|
||||||
wget -O haproxy.tar.gz "$HAPROXY_URL"; \
|
wget -O haproxy.tar.gz "$HAPROXY_URL"; \
|
||||||
# echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c; \
|
# echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c; \
|
||||||
@ -93,6 +93,7 @@ RUN set -eux; \
|
|||||||
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
|
# "graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy process"
|
||||||
STOPSIGNAL SIGUSR1
|
STOPSIGNAL SIGUSR1
|
||||||
|
|
||||||
|
ADD haproxy/dataplaneapi.yml /etc/haproxy/dataplaneapi.yml
|
||||||
ADD haproxy/docker-entrypoint.sh /usr/local/bin/
|
ADD haproxy/docker-entrypoint.sh /usr/local/bin/
|
||||||
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
|
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
|
||||||
RUN apt update && apt install -y git lua5.3 liblua5.3-dev argon2 libargon2-dev luarocks
|
RUN apt update && apt install -y git lua5.3 liblua5.3-dev argon2 libargon2-dev luarocks
|
||||||
|
28
haproxy/dataplaneapi.yml
Normal file
28
haproxy/dataplaneapi.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
config_version: 2
|
||||||
|
dataplaneapi:
|
||||||
|
tls:
|
||||||
|
host: 127.0.0.1
|
||||||
|
port: 2001
|
||||||
|
resources:
|
||||||
|
update_map_files: true
|
||||||
|
maps_dir: /etc/haproxy/map
|
||||||
|
ssl_certs_dir: /etc/haproxy/ssl
|
||||||
|
scheme:
|
||||||
|
- http
|
||||||
|
transaction:
|
||||||
|
transaction_dir: /tmp/haproxy
|
||||||
|
user:
|
||||||
|
- admin:
|
||||||
|
name: admin
|
||||||
|
insecure: true
|
||||||
|
haproxy:
|
||||||
|
config_file: /etc/haproxy/haproxy.cfg
|
||||||
|
haproxy_bin: /usr/local/sbin/haproxy
|
||||||
|
reload:
|
||||||
|
reload_cmd: service haproxy reload
|
||||||
|
restart_cmd: service haproxy restart
|
||||||
|
reload_delay: 5
|
||||||
|
reload_strategy: systemd
|
||||||
|
mode: single
|
||||||
|
name: basedflare
|
@ -28,7 +28,7 @@ defaults
|
|||||||
http-error status 504 content-type "text/html; charset=utf-8" lf-file /etc/haproxy/errors/504.http
|
http-error status 504 content-type "text/html; charset=utf-8" lf-file /etc/haproxy/errors/504.http
|
||||||
|
|
||||||
program api
|
program api
|
||||||
command dataplaneapi -f /etc/haproxy/dataplaneapi.hcl --update-map-files
|
command dataplaneapi -f /etc/haproxy/dataplaneapi.yml --update-map-files
|
||||||
no option start-on-reload
|
no option start-on-reload
|
||||||
|
|
||||||
frontend stats-frontend
|
frontend stats-frontend
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
127.0.0.1 websrv1
|
|
||||||
localhost websrv2
|
|
||||||
|
@ -1,2 +1,23 @@
|
|||||||
127.0.0.1 127.0.0.1:81
|
127.0.0.1 127.0.0.1:82
|
||||||
|
127.0.0.1 127.0.0.1:83
|
||||||
|
127.0.0.1 127.0.0.1:84
|
||||||
|
127.0.0.1 127.0.0.1:85
|
||||||
|
127.0.0.1 127.0.0.1:86
|
||||||
|
127.0.0.1 127.0.0.1:87
|
||||||
|
127.0.0.1 127.0.0.1:88
|
||||||
|
127.0.0.1 127.0.0.1:89
|
||||||
|
127.0.0.1 127.0.0.1:821
|
||||||
|
127.0.0.1 127.0.0.1:82
|
||||||
|
127.0.0.1 127.0.0.1:83
|
||||||
|
127.0.0.1 127.0.0.1:84
|
||||||
|
127.0.0.1 127.0.0.1:85
|
||||||
|
127.0.0.1 127.0.0.1:86
|
||||||
|
127.0.0.1 127.0.0.1:87
|
||||||
|
127.0.0.1 127.0.0.1:88
|
||||||
|
127.0.0.1 127.0.0.1:89
|
||||||
|
127.0.0.1 127.0.0.1:8212
|
||||||
|
127.0.0.1 127.0.0.1:823
|
||||||
|
127.0.0.1 127.0.0.1:834
|
||||||
|
127.0.0.1 127.0.0.1:856
|
||||||
localhost 127.0.0.1:81
|
localhost 127.0.0.1:81
|
||||||
|
localhost-test 127.0.0.1:3000
|
||||||
|
Reference in New Issue
Block a user