bunkerweb/examples/proxy-protocol/docker-compose.yml

82 lines
1.7 KiB
YAML
Raw Normal View History

version: "3"
2022-06-03 15:24:14 +00:00
services:
mybunker:
2024-05-25 14:56:42 +00:00
image: bunkerity/bunkerweb:1.5.8
2022-06-03 15:24:14 +00:00
environment:
- SERVER_NAME=www.example.com # replace with your domains
2022-12-02 14:37:23 +00:00
- API_WHITELIST_IP=127.0.0.0/8 10.20.30.0/24
2022-06-03 15:24:14 +00:00
- SERVE_FILES=no
- DISABLE_DEFAULT_SERVER=yes
- AUTO_LETS_ENCRYPT=yes
- USE_CLIENT_CACHE=yes
- USE_GZIP=yes
- USE_REVERSE_PROXY=yes
- REVERSE_PROXY_URL=/
- REVERSE_PROXY_HOST=http://myapp:8080
2022-06-03 15:24:14 +00:00
# proxy protocol settings
- USE_PROXY_PROTOCOL=yes
- USE_REAL_IP=yes
- REAL_IP_FROM=10.10.10.0/24
- REAL_IP_HEADER=proxy_protocol
2022-12-02 14:37:23 +00:00
labels:
- "bunkerweb.INSTANCE=yes" # required for the scheduler to recognize the container
2022-06-03 15:24:14 +00:00
networks:
2022-12-02 14:37:23 +00:00
- net-proxy
- bw-universe
- bw-services
bw-scheduler:
2024-05-25 14:56:42 +00:00
image: bunkerity/bunkerweb-scheduler:1.5.8
2022-12-02 14:37:23 +00:00
depends_on:
- mybunker
environment:
2023-03-16 16:43:47 +00:00
- DOCKER_HOST=tcp://bw-docker-proxy:2375
2022-12-02 14:37:23 +00:00
volumes:
- bw-data:/data
networks:
- bw-universe
2023-03-16 16:43:47 +00:00
- bw-docker
2022-12-02 14:37:23 +00:00
2023-03-16 16:43:47 +00:00
bw-docker-proxy:
image: tecnativa/docker-socket-proxy:nightly
2022-12-02 14:37:23 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- CONTAINERS=1
- LOG_LEVEL=warning
2022-12-02 14:37:23 +00:00
networks:
2023-03-16 16:43:47 +00:00
- bw-docker
2022-06-03 15:24:14 +00:00
myproxy:
image: haproxy:2.9-alpine
2022-06-03 15:24:14 +00:00
ports:
- 80:8080
- 443:8443
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
networks:
2022-12-02 14:37:23 +00:00
- net-proxy
2022-06-03 15:24:14 +00:00
myapp:
image: nginxdemos/nginx-hello
2022-06-03 15:24:14 +00:00
networks:
2022-12-02 14:37:23 +00:00
- bw-services
2022-06-03 15:24:14 +00:00
volumes:
2022-12-02 14:37:23 +00:00
bw-data:
2022-06-03 15:24:14 +00:00
networks:
2022-12-02 14:37:23 +00:00
bw-universe:
ipam:
driver: default
config:
- subnet: 10.20.30.0/24
bw-services:
2023-03-16 16:43:47 +00:00
bw-docker:
2022-12-02 14:37:23 +00:00
net-proxy:
2022-06-03 15:24:14 +00:00
ipam:
driver: default
config:
- subnet: 10.10.10.0/24