bunkerweb/examples/mongo-express/docker-compose.yml
2022-10-19 17:37:13 +02:00

53 lines
1.9 KiB
YAML

version: "3"
services:
mybunker:
image: bunkerity/bunkerweb:1.4.3
ports:
- 80:8080
- 443:8443
# ⚠️ 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
# another example for existing folder : chown -R root:101 folder && chmod -R 770 folder
# more info at https://docs.bunkerweb.io
volumes:
- bw_data:/data
environment:
- SERVER_NAME=www.example.com # replace with your domain
- 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://mongo-ui:8081
- |
CUSTOM_CONF_MODSEC_mongo-express=
SecRule REQUEST_FILENAME "@rx ^/db" "id:1,ctl:ruleRemoveByTag=attack-generic,ctl:ruleRemoveByTag=attack-protocol,nolog"
mongo:
image: mongo:latest
volumes:
- ./db:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=root # replace with a less obvious username
- MONGO_INITDB_ROOT_PASSWORD=toor # replace with a better password
- MONGO_INITDB_DATABASE=mongo # replace with the database name of your choice
mongo-ui:
image: mongo-express:latest
environment:
- ME_CONFIG_MONGODB_SERVER=mongo
- ME_CONFIG_MONGODB_ADMINUSERNAME=root # replace with a less obvious username
- ME_CONFIG_MONGODB_ADMINPASSWORD=toor # replace with a better password
- ME_CONFIG_BASICAUTH_USERNAME=changeme # replace with a better username
- ME_CONFIG_BASICAUTH_PASSWORD=changeme # replace with a better password
restart: unless-stopped
depends_on:
- mongo
volumes:
bw_data: