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

89 lines
2.1 KiB
YAML
Raw Normal View History

version: "3"
2022-06-03 15:24:14 +00:00
services:
mybunker:
2022-12-02 14:37:23 +00:00
image: bunkerity/bunkerweb:1.5.0
2022-06-03 15:24:14 +00:00
# ⚠️ read this if you use local folders for volumes ⚠️
# bunkerweb runs as an unprivileged user with UID/GID 101
# don't forget to edit the permissions of the files and folders accordingly
# example if you need to create a directory : mkdir folder && chown root:101 folder && chmod 770 folder
# or for an existing one : chown -R root:101 folder && chmod -R 770 folder
# more info at https://docs.bunkerweb.io
volumes:
2022-12-02 14:37:23 +00:00
- bw-data:/data
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
# 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" # 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:
image: bunkerity/bunkerweb-scheduler:1.5.0
depends_on:
- mybunker
environment:
- DOCKER_HOST=tcp://docker-proxy:2375
volumes:
- bw-data:/data
networks:
- bw-universe
- net-docker
docker-proxy:
2022-12-05 10:47:56 +00:00
image: tecnativa/docker-socket-proxy:0.1
2022-12-02 14:37:23 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- CONTAINERS=1
networks:
- net-docker
2022-06-03 15:24:14 +00:00
myproxy:
2022-12-05 10:47:56 +00:00
image: haproxy:2.7-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: tutum/hello-world
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:
net-docker:
net-proxy:
2022-06-03 15:24:14 +00:00
ipam:
driver: default
config:
- subnet: 10.10.10.0/24