bunkerweb/examples/drupal/docker-compose.yml

87 lines
2.1 KiB
YAML
Raw Normal View History

version: "3"
2022-06-03 15:24:14 +00:00
services:
mybunker:
2023-09-06 13:11:36 +00:00
image: bunkerity/bunkerweb:1.5.2
2022-06-03 15:24:14 +00:00
ports:
- 80:8080
- 443:8443
2022-11-20 17:53:41 +00:00
environment:
SERVER_NAME: "www.example.com" # replace with your domain
API_WHITELIST_IP: "127.0.0.0/8 10.20.30.0/24"
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://mydrupal"
2022-12-05 10:47:56 +00:00
CUSTOM_CONF_MODSEC_CRS_drupal: 'SecAction "id:900130,phase:1,nolog,pass,t:none,setvar:tx.crs_exclusions_drupal=1"'
2023-10-03 10:37:56 +00:00
# Once the installation is done, you can remove these lines
2022-11-20 17:53:41 +00:00
LIMIT_REQ_URL_1: "/core/install.php"
LIMIT_REQ_RATE_1: "5r/s"
labels:
2022-11-21 10:28:08 +00:00
- "bunkerweb.INSTANCE" # required for the scheduler to recognize the container
2022-11-20 17:53:41 +00:00
networks:
- bw-universe
- bw-services
bw-scheduler:
2023-09-06 13:11:36 +00:00
image: bunkerity/bunkerweb-scheduler:1.5.2
2022-11-20 17:53:41 +00:00
depends_on:
- mybunker
2022-06-03 15:24:14 +00:00
environment:
2023-03-08 16:01:55 +00:00
DOCKER_HOST: "tcp://bw-docker-proxy:2375"
2022-11-20 17:53:41 +00:00
volumes:
- bw-data:/data
networks:
- bw-universe
2023-03-08 16:01:55 +00:00
- bw-docker
2022-11-21 10:28:08 +00:00
2023-03-08 16:01:55 +00:00
bw-docker-proxy:
image: tecnativa/docker-socket-proxy:nightly
2022-11-21 10:28:08 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- CONTAINERS=1
- LOG_LEVEL=warning
2022-11-21 10:28:08 +00:00
networks:
2023-03-08 16:01:55 +00:00
- bw-docker
2022-06-03 15:24:14 +00:00
mydrupal:
2022-12-05 10:47:56 +00:00
image: drupal:9.4-apache
2022-06-03 15:24:14 +00:00
volumes:
- ./drupal-modules:/var/www/html/modules
- ./drupal-profiles:/var/www/html/profiles
- ./drupal-themes:/var/www/html/themes
- ./drupal-sites:/var/www/html/sites
2022-11-20 17:53:41 +00:00
networks:
- bw-services
2022-06-03 15:24:14 +00:00
mydb:
2022-12-05 10:47:56 +00:00
image: mariadb:10.10
2022-06-03 15:24:14 +00:00
volumes:
2022-11-20 17:53:41 +00:00
- db-data:/var/lib/mysql
2022-06-03 15:24:14 +00:00
environment:
2023-03-08 16:01:55 +00:00
- MYSQL_ROOT_PASSWORD=db-root-pwd # replace with a stronger password
- MYSQL_DATABASE=drupaldb
- MYSQL_USER=user
- MYSQL_PASSWORD=db-user-pwd # replace with a stronger password
2022-11-20 17:53:41 +00:00
networks:
- bw-services
volumes:
2022-11-20 17:53:41 +00:00
bw-data:
db-data:
2023-10-03 10:37:56 +00:00
2022-11-20 17:53:41 +00:00
networks:
bw-universe:
ipam:
driver: default
config:
- subnet: 10.20.30.0/24
bw-services:
2023-03-08 16:01:55 +00:00
bw-docker: