bunkerweb/examples/crowdsec/docker-compose.yml

93 lines
2 KiB
YAML
Raw Normal View History

2020-12-28 17:42:20 +00:00
version: '3'
services:
mywww:
image: bunkerity/bunkerized-nginx
2020-12-28 17:42:20 +00:00
restart: always
2021-05-18 12:03:16 +00:00
# mandatory for crowdsec :
# you need to redirect Docker logs to the syslog server
logging:
driver: syslog
options:
syslog-address: "udp://10.10.10.254:514"
depends_on:
- mysyslog
- myapp1
- myapp2
2020-12-28 17:42:20 +00:00
ports:
- 80:8080
- 443:8443
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
# don't forget to edit the permissions of the files and folders accordingly
2020-12-28 17:42:20 +00:00
volumes:
- ./web-files:/www:ro
- ./letsencrypt:/etc/letsencrypt
2021-07-16 08:05:53 +00:00
- ./bunkerized-nginx-crowdsec:/plugins/crowdsec # edit plugin.json
2020-12-28 17:42:20 +00:00
environment:
- SERVER_NAME=app1.example.com app2.example.com # replace with your domains
2020-12-28 17:42:20 +00:00
- MULTISITE=yes
- AUTO_LETS_ENCRYPT=yes
- REDIRECT_HTTP_TO_HTTPS=yes
- DISABLE_DEFAULT_SERVER=yes
- USE_CLIENT_CACHE=yes
- USE_GZIP=yes
- app1.example.com_REMOTE_PHP=myapp1
- app1.example.com_REMOTE_PHP_PATH=/app
- app2.example.com_REMOTE_PHP=myapp2
- app2.example.com_REMOTE_PHP_PATH=/app
2020-12-28 17:42:20 +00:00
networks:
2021-05-18 12:03:16 +00:00
net0:
net1:
net2:
2020-12-28 17:42:20 +00:00
mycrowdsec:
2021-04-26 15:00:23 +00:00
image: crowdsecurity/crowdsec:v1.0.13
2020-12-28 17:42:20 +00:00
restart: always
volumes:
- ./acquis.yaml:/etc/crowdsec/acquis.yaml
- nginx_logs:/var/log:ro
environment:
- COLLECTIONS=crowdsecurity/nginx
- REGISTER_TO_ONLINE_API=true
networks:
- net0
2021-05-18 12:03:16 +00:00
mysyslog:
image: balabit/syslog-ng
restart: always
volumes:
- ./syslog-ng.conf:/etc/syslog-ng/syslog-ng.conf
- nginx_logs:/var/log
networks:
net0:
ipv4_address: 10.10.10.254
2020-12-28 17:42:20 +00:00
myapp1:
image: php:fpm
restart: always
volumes:
- ./web-files/app1.example.com:/app
2020-12-28 17:42:20 +00:00
networks:
- net1
myapp2:
image: php:fpm
restart: always
volumes:
- ./web-files/app2.example.com:/app
2020-12-28 17:42:20 +00:00
networks:
- net2
networks:
net0:
2021-05-18 12:03:16 +00:00
ipam:
driver: default
config:
- subnet: 10.10.10.0/24
2020-12-28 17:42:20 +00:00
net1:
net2:
volumes:
nginx_logs: