From 89812362a159318be709a20ba971b189eeff09f7 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 16 Mar 2023 17:43:47 +0100 Subject: [PATCH] continue examples refactoring --- examples/php-cookie-flags/docker-compose.yml | 20 ++++---- examples/php-cookie-flags/setup-docker.sh | 8 ++-- examples/php-cookie-flags/setup-linux.sh | 4 +- .../{bw-data => }/www/index.php | 0 examples/php-multisite/autoconf.yml | 16 +++---- examples/php-multisite/docker-compose.yml | 28 +++++------ examples/php-multisite/setup-autoconf.sh | 8 ++-- examples/php-multisite/setup-docker.sh | 8 ++-- examples/php-multisite/setup-linux.sh | 4 +- .../www/app1.example.com/index.php | 0 .../www/app1.example.com/js/script.js | 0 .../www/app2.example.com/index.php | 0 .../www/app2.example.com/js/script.js | 0 examples/php-singlesite/docker-compose.yml | 18 +++---- examples/php-singlesite/setup-docker.sh | 8 ++-- examples/php-singlesite/setup-linux.sh | 4 +- .../{bw-data => }/www/index.php | 0 .../{bw-data => }/www/js/script.js | 0 examples/prestashop/autoconf.yml | 8 +++- examples/prestashop/docker-compose.yml | 48 ++++++++----------- examples/prestashop/swarm.yml | 8 ++-- examples/proxy-protocol/docker-compose.yml | 18 ++----- examples/radarr/docker-compose.yml | 18 ++----- examples/radarr/swarm.yml | 12 ++--- 24 files changed, 101 insertions(+), 137 deletions(-) rename examples/php-cookie-flags/{bw-data => }/www/index.php (100%) rename examples/php-multisite/{bw-data => }/www/app1.example.com/index.php (100%) rename examples/php-multisite/{bw-data => }/www/app1.example.com/js/script.js (100%) rename examples/php-multisite/{bw-data => }/www/app2.example.com/index.php (100%) rename examples/php-multisite/{bw-data => }/www/app2.example.com/js/script.js (100%) rename examples/php-singlesite/{bw-data => }/www/index.php (100%) rename examples/php-singlesite/{bw-data => }/www/js/script.js (100%) diff --git a/examples/php-cookie-flags/docker-compose.yml b/examples/php-cookie-flags/docker-compose.yml index 221c4c39..9ac93aae 100644 --- a/examples/php-cookie-flags/docker-compose.yml +++ b/examples/php-cookie-flags/docker-compose.yml @@ -13,7 +13,7 @@ services: # 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 # contains web files (PHP, assets, ...) + - ./www/var/www/html # contains web files (PHP, assets, ...) environment: - SERVER_NAME=www.example.com # replace with your domain - API_WHITELIST_IP=127.0.0.0/8 10.20.30.0/24 @@ -35,30 +35,30 @@ services: depends_on: - mybunker environment: - - DOCKER_HOST=tcp://docker-proxy:2375 + - DOCKER_HOST=tcp://bw-docker-proxy:2375 volumes: - - ./bw-data:/data + - bw-data:/data networks: - bw-universe - - net-docker + - bw-docker - docker-proxy: + bw-docker-proxy: image: tecnativa/docker-socket-proxy:0.1 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - CONTAINERS=1 networks: - - net-docker + - bw-docker myphp: image: php:fpm-alpine3.17 - # ⚠️ UID and GID of bunkerweb (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️ + # ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️ # but both needs access to the files and folders of web-files # don't forget to edit the permissions of the files and folders accordingly - # example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \; + # example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \; volumes: - - ./bw-data/www:/app # folder containing PHP app + - ./www:/app # folder containing PHP app networks: - bw-services @@ -69,4 +69,4 @@ networks: config: - subnet: 10.20.30.0/24 bw-services: - net-docker: + bw-docker: diff --git a/examples/php-cookie-flags/setup-docker.sh b/examples/php-cookie-flags/setup-docker.sh index f87e3d84..3d7eb0a5 100755 --- a/examples/php-cookie-flags/setup-docker.sh +++ b/examples/php-cookie-flags/setup-docker.sh @@ -5,8 +5,6 @@ if [ $(id -u) -ne 0 ] ; then exit 1 fi -chown -R root:101 bw-data -chmod -R 770 bw-data -chown -R 82:101 ./bw-data/www -find ./bw-data/www -type f -exec chmod 0640 {} \; -find ./bw-data/www -type d -exec chmod 0750 {} \; +chown -R 33:101 ./www +find ./www -type f -exec chmod 0640 {} \; +find ./www -type d -exec chmod 0750 {} \; diff --git a/examples/php-cookie-flags/setup-linux.sh b/examples/php-cookie-flags/setup-linux.sh index 2d5d22d1..8d69ed38 100755 --- a/examples/php-cookie-flags/setup-linux.sh +++ b/examples/php-cookie-flags/setup-linux.sh @@ -14,9 +14,7 @@ else exit 1 fi -chown -R root:101 bw-data -chmod -R 770 bw-data -cp -r ./bw-data/www/* /var/www/html +cp -r ./www/* /var/www/html chown -R $user:nginx /var/www/html find /var/www/html -type f -exec chmod 0640 {} \; find /var/www/html -type d -exec chmod 0750 {} \; \ No newline at end of file diff --git a/examples/php-cookie-flags/bw-data/www/index.php b/examples/php-cookie-flags/www/index.php similarity index 100% rename from examples/php-cookie-flags/bw-data/www/index.php rename to examples/php-cookie-flags/www/index.php diff --git a/examples/php-multisite/autoconf.yml b/examples/php-multisite/autoconf.yml index 5ed9a743..bd63d07a 100644 --- a/examples/php-multisite/autoconf.yml +++ b/examples/php-multisite/autoconf.yml @@ -2,13 +2,13 @@ version: "3" services: myapp1: - image: php:fpm-alpine3.17 - # ⚠️ UID and GID of mywww (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️ + image: php:fpm + # ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️ # but both needs access to the files and folders of web-files # don't forget to edit the permissions of the files and folders accordingly - # example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \; + # example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \; volumes: - - ./bw-data/www/app1.example.com:/app # folder containing PHP app1 (don't forget to rename it) + - ./www/app1.example.com:/app # folder containing PHP app1 (don't forget to rename it) networks: bw-services: aliases: @@ -19,13 +19,13 @@ services: - bunkerweb.REMOTE_PHP_PATH=/app myapp2: - image: php:fpm-alpine3.17 - # ⚠️ UID and GID of bunkerweb (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️ + image: php:fpm + # ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️ # but both needs access to the files and folders of web-files # don't forget to edit the permissions of the files and folders accordingly - # example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \; + # example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \; volumes: - - ./bw-data/www/app2.example.com:/app # folder containing PHP app2 (don't forget to rename it) + - ./www/app2.example.com:/app # folder containing PHP app2 (don't forget to rename it) networks: bw-services: aliases: diff --git a/examples/php-multisite/docker-compose.yml b/examples/php-multisite/docker-compose.yml index d9565cdc..2c5ec1e6 100644 --- a/examples/php-multisite/docker-compose.yml +++ b/examples/php-multisite/docker-compose.yml @@ -13,7 +13,7 @@ services: # 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 # contains web files (PHP, assets, ...), don't forget to rename the subfolders + - ./www:/var/www/html # contains web files (PHP, assets, ...), don't forget to rename the subfolders environment: - SERVER_NAME=app1.example.com app2.example.com # replace with your domains - API_WHITELIST_IP=127.0.0.0/8 10.20.30.0/24 @@ -38,41 +38,41 @@ services: depends_on: - mybunker environment: - - DOCKER_HOST=tcp://docker-proxy:2375 + - DOCKER_HOST=tcp://bw-docker-proxy:2375 volumes: - ./bw-data:/data networks: - bw-universe - - net-docker + - bw-docker - docker-proxy: + bw-docker-proxy: image: tecnativa/docker-socket-proxy:0.1 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - CONTAINERS=1 networks: - - net-docker + - bw-docker myapp1: - image: php:fpm-alpine3.17 - # ⚠️ UID and GID of mywww (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️ + image: php:fpm + # ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️ # but both needs access to the files and folders of web-files # don't forget to edit the permissions of the files and folders accordingly - # example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \; + # example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \; volumes: - - ./bw-data/www/app1.example.com:/app # folder containing PHP app1 (don't forget to rename it) + - ./www/app1.example.com:/app # folder containing PHP app1 (don't forget to rename it) networks: - net-app1 myapp2: - image: php:fpm-alpine3.17 - # ⚠️ UID and GID of bunkerweb (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️ + image: php:fpm + # ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️ # but both needs access to the files and folders of web-files # don't forget to edit the permissions of the files and folders accordingly - # example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \; + # example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \; volumes: - - ./bw-data/www/app2.example.com:/app # folder containing PHP app2 (don't forget to rename it) + - ./www/app2.example.com:/app # folder containing PHP app2 (don't forget to rename it) networks: - net-app2 @@ -82,6 +82,6 @@ networks: driver: default config: - subnet: 10.20.30.0/24 - net-docker: + bw-docker: net-app1: net-app2: diff --git a/examples/php-multisite/setup-autoconf.sh b/examples/php-multisite/setup-autoconf.sh index f87e3d84..3d7eb0a5 100755 --- a/examples/php-multisite/setup-autoconf.sh +++ b/examples/php-multisite/setup-autoconf.sh @@ -5,8 +5,6 @@ if [ $(id -u) -ne 0 ] ; then exit 1 fi -chown -R root:101 bw-data -chmod -R 770 bw-data -chown -R 82:101 ./bw-data/www -find ./bw-data/www -type f -exec chmod 0640 {} \; -find ./bw-data/www -type d -exec chmod 0750 {} \; +chown -R 33:101 ./www +find ./www -type f -exec chmod 0640 {} \; +find ./www -type d -exec chmod 0750 {} \; diff --git a/examples/php-multisite/setup-docker.sh b/examples/php-multisite/setup-docker.sh index f87e3d84..3d7eb0a5 100755 --- a/examples/php-multisite/setup-docker.sh +++ b/examples/php-multisite/setup-docker.sh @@ -5,8 +5,6 @@ if [ $(id -u) -ne 0 ] ; then exit 1 fi -chown -R root:101 bw-data -chmod -R 770 bw-data -chown -R 82:101 ./bw-data/www -find ./bw-data/www -type f -exec chmod 0640 {} \; -find ./bw-data/www -type d -exec chmod 0750 {} \; +chown -R 33:101 ./www +find ./www -type f -exec chmod 0640 {} \; +find ./www -type d -exec chmod 0750 {} \; diff --git a/examples/php-multisite/setup-linux.sh b/examples/php-multisite/setup-linux.sh index 2d5d22d1..8d69ed38 100755 --- a/examples/php-multisite/setup-linux.sh +++ b/examples/php-multisite/setup-linux.sh @@ -14,9 +14,7 @@ else exit 1 fi -chown -R root:101 bw-data -chmod -R 770 bw-data -cp -r ./bw-data/www/* /var/www/html +cp -r ./www/* /var/www/html chown -R $user:nginx /var/www/html find /var/www/html -type f -exec chmod 0640 {} \; find /var/www/html -type d -exec chmod 0750 {} \; \ No newline at end of file diff --git a/examples/php-multisite/bw-data/www/app1.example.com/index.php b/examples/php-multisite/www/app1.example.com/index.php similarity index 100% rename from examples/php-multisite/bw-data/www/app1.example.com/index.php rename to examples/php-multisite/www/app1.example.com/index.php diff --git a/examples/php-multisite/bw-data/www/app1.example.com/js/script.js b/examples/php-multisite/www/app1.example.com/js/script.js similarity index 100% rename from examples/php-multisite/bw-data/www/app1.example.com/js/script.js rename to examples/php-multisite/www/app1.example.com/js/script.js diff --git a/examples/php-multisite/bw-data/www/app2.example.com/index.php b/examples/php-multisite/www/app2.example.com/index.php similarity index 100% rename from examples/php-multisite/bw-data/www/app2.example.com/index.php rename to examples/php-multisite/www/app2.example.com/index.php diff --git a/examples/php-multisite/bw-data/www/app2.example.com/js/script.js b/examples/php-multisite/www/app2.example.com/js/script.js similarity index 100% rename from examples/php-multisite/bw-data/www/app2.example.com/js/script.js rename to examples/php-multisite/www/app2.example.com/js/script.js diff --git a/examples/php-singlesite/docker-compose.yml b/examples/php-singlesite/docker-compose.yml index 8208d198..f36a1928 100644 --- a/examples/php-singlesite/docker-compose.yml +++ b/examples/php-singlesite/docker-compose.yml @@ -13,7 +13,7 @@ services: # 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 # contains web files (PHP, assets, ...) + - ./www:/var/www/html # contains web files (PHP, assets, ...) environment: - SERVER_NAME=www.example.com # replace with your domain - API_WHITELIST_IP=127.0.0.0/8 10.20.30.0/24 @@ -34,30 +34,30 @@ services: depends_on: - mybunker environment: - - DOCKER_HOST=tcp://docker-proxy:2375 + - DOCKER_HOST=tcp://bw-docker-proxy:2375 volumes: - ./bw-data:/data networks: - bw-universe - - net-docker + - bw-docker - docker-proxy: + bw-docker-proxy: image: tecnativa/docker-socket-proxy:0.1 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - CONTAINERS=1 networks: - - net-docker + - bw-docker myphp: - image: php:fpm-alpine3.17 - # ⚠️ UID and GID of bunkerweb (101:101) and php:fpm-alpine3.17 (82:82) are not the same ⚠️ + image: php:fpm + # ⚠️ UID and GID of BunkerWeb (101:101) and php:fpm (33:33) are not the same ⚠️ # but both needs access to the files and folders of web-files # don't forget to edit the permissions of the files and folders accordingly - # example : chown -R 82:101 ./bw-data/www && find ./bw-data/www -type f -exec chmod 0640 {} \; && find ./bw-data/www -type d -exec chmod 0750 {} \; + # example : chown -R 33:101 ./www && find ./www -type f -exec chmod 0640 {} \; && find ./www -type d -exec chmod 0750 {} \; volumes: - - ./bw-data/www:/app # folder containing PHP app + - ./www:/app # folder containing PHP app networks: - bw-services diff --git a/examples/php-singlesite/setup-docker.sh b/examples/php-singlesite/setup-docker.sh index f87e3d84..3d7eb0a5 100755 --- a/examples/php-singlesite/setup-docker.sh +++ b/examples/php-singlesite/setup-docker.sh @@ -5,8 +5,6 @@ if [ $(id -u) -ne 0 ] ; then exit 1 fi -chown -R root:101 bw-data -chmod -R 770 bw-data -chown -R 82:101 ./bw-data/www -find ./bw-data/www -type f -exec chmod 0640 {} \; -find ./bw-data/www -type d -exec chmod 0750 {} \; +chown -R 33:101 ./www +find ./www -type f -exec chmod 0640 {} \; +find ./www -type d -exec chmod 0750 {} \; diff --git a/examples/php-singlesite/setup-linux.sh b/examples/php-singlesite/setup-linux.sh index 2d5d22d1..8d69ed38 100755 --- a/examples/php-singlesite/setup-linux.sh +++ b/examples/php-singlesite/setup-linux.sh @@ -14,9 +14,7 @@ else exit 1 fi -chown -R root:101 bw-data -chmod -R 770 bw-data -cp -r ./bw-data/www/* /var/www/html +cp -r ./www/* /var/www/html chown -R $user:nginx /var/www/html find /var/www/html -type f -exec chmod 0640 {} \; find /var/www/html -type d -exec chmod 0750 {} \; \ No newline at end of file diff --git a/examples/php-singlesite/bw-data/www/index.php b/examples/php-singlesite/www/index.php similarity index 100% rename from examples/php-singlesite/bw-data/www/index.php rename to examples/php-singlesite/www/index.php diff --git a/examples/php-singlesite/bw-data/www/js/script.js b/examples/php-singlesite/www/js/script.js similarity index 100% rename from examples/php-singlesite/bw-data/www/js/script.js rename to examples/php-singlesite/www/js/script.js diff --git a/examples/prestashop/autoconf.yml b/examples/prestashop/autoconf.yml index f4657c47..a668819a 100644 --- a/examples/prestashop/autoconf.yml +++ b/examples/prestashop/autoconf.yml @@ -4,7 +4,7 @@ services: myps: image: prestashop/prestashop:1.7 volumes: - - ./ps-data:/var/www/html + - ps-data:/var/www/html networks: bw-services: aliases: @@ -31,7 +31,7 @@ services: mydb: image: mariadb volumes: - - ./db-data:/var/lib/mysql + - db-data:/var/lib/mysql networks: bw-services: aliases: @@ -46,3 +46,7 @@ networks: bw-services: external: name: bw-services + +volumes: + ps-data: + db-data: diff --git a/examples/prestashop/docker-compose.yml b/examples/prestashop/docker-compose.yml index 2b9da688..2ceb4461 100644 --- a/examples/prestashop/docker-compose.yml +++ b/examples/prestashop/docker-compose.yml @@ -1,24 +1,12 @@ version: "3" -x-bunkerweb-env: &bunkerweb-env - DATABASE_URI: "mariadb+pymysql://${PRESTASHOP_USER:-user}:${PRESTASHOP_PASSWORD:-secret}@mydb:3306/${BUNKERWEB_DATABASE:-bunkerweb}" - services: mybunker: image: bunkerity/bunkerweb:1.5.0 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: - <<: *bunkerweb-env 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" @@ -44,33 +32,32 @@ services: depends_on: - mybunker environment: - <<: *bunkerweb-env - DOCKER_HOST: "tcp://docker-proxy:2375" + DOCKER_HOST: "tcp://bw-docker-proxy:2375" volumes: - bw-data:/data networks: - bw-universe - - net-docker + - bw-docker - docker-proxy: + bw-docker-proxy: image: tecnativa/docker-socket-proxy:0.1 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - CONTAINERS=1 networks: - - net-docker + - bw-docker myps: image: prestashop/prestashop:1.7 volumes: - - ./ps-data:/var/www/html + - ps-data:/var/www/html environment: - DB_SERVER=mydb - - DB_USER=${PRESTASHOP_USER:-user} - - DB_PASSWD=${PRESTASHOP_PASSWORD:-secret} # set a stronger password in a .env file (must match MYSQL_PASSWORD) + - DB_USER=user + - DB_PASSWD=db-user-pwd # replace with a stronger password (must match MYSQL_PASSWORD) - DB_PREFIX=prefix_ # replace with a random prefix (good security practice) - - DB_NAME=${PRESTASHOP_DATABASE:-prestashop} + - DB_NAME=prestashop - PS_ENABLE_SSL=1 - ADMIN_MAIL=admin@example.com # change to the prestashop admin email - ADMIN_PASSWD=changeme # change to the prestashop admin password @@ -78,19 +65,22 @@ services: networks: - bw-services - mydb: - image: mariadb:10.10 + image: mariadb volumes: - db-data:/var/lib/mysql - environment: - MARIADB_RANDOM_ROOT_PASSWORD: "yes" - entrypoint: sh -c "echo 'DROP USER IF EXISTS \"${PRESTASHOP_USER:-user}\"; CREATE USER \"${PRESTASHOP_USER:-user}\"@\"%\"; CREATE DATABASE IF NOT EXISTS ${PRESTASHOP_DATABASE:-prestashop}; CREATE DATABASE IF NOT EXISTS ${BUNKERWEB_DATABASE:-bunkerweb}; GRANT ALL PRIVILEGES ON ${PRESTASHOP_DATABASE:-prestashop}.* TO \"${PRESTASHOP_USER:-user}\"@\"%\" IDENTIFIED BY \"${PRESTASHOP_PASSWORD:-secret}\"; GRANT ALL PRIVILEGES ON ${BUNKERWEB_DATABASE:-bunkerweb}.* TO \"${PRESTASHOP_USER:-user}\"@\"%\" IDENTIFIED BY \"${PRESTASHOP_PASSWORD:-secret}\"; FLUSH PRIVILEGES;' > /docker-entrypoint-initdb.d/init.sql; /usr/local/bin/docker-entrypoint.sh --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci" networks: - - bw-universe - - bw-services + bw-services: + aliases: + - mydb + environment: + - MYSQL_ROOT_PASSWORD=db-root-pwd # replace with a stronger password + - MYSQL_DATABASE=prestashop + - MYSQL_USER=user + - MYSQL_PASSWORD=db-user-pwd # replace with a stronger password (must match DB_PASSWD) volumes: bw-data: + ps-data: db-data: networks: @@ -100,4 +90,4 @@ networks: config: - subnet: 10.20.30.0/24 bw-services: - net-docker: + bw-docker: diff --git a/examples/prestashop/swarm.yml b/examples/prestashop/swarm.yml index 3741ed04..d0b838aa 100644 --- a/examples/prestashop/swarm.yml +++ b/examples/prestashop/swarm.yml @@ -4,7 +4,7 @@ services: myps: image: prestashop/prestashop:1.7 volumes: - - ps_data:/var/www/html + - ps-data:/var/www/html networks: - bw-services environment: @@ -33,7 +33,7 @@ services: mydb: image: mariadb volumes: - - db_data:/var/lib/mysql + - db-data:/var/lib/mysql networks: - bw-services environment: @@ -52,5 +52,5 @@ networks: name: bw-services volumes: - ps_data: - db_data: + ps-data: + db-data: diff --git a/examples/proxy-protocol/docker-compose.yml b/examples/proxy-protocol/docker-compose.yml index 649cf88d..2d5cafdd 100644 --- a/examples/proxy-protocol/docker-compose.yml +++ b/examples/proxy-protocol/docker-compose.yml @@ -3,14 +3,6 @@ version: "3" services: mybunker: image: bunkerity/bunkerweb:1.5.0 - # ⚠️ 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: - - bw-data:/data environment: - SERVER_NAME=www.example.com # replace with your domains - API_WHITELIST_IP=127.0.0.0/8 10.20.30.0/24 @@ -39,21 +31,21 @@ services: depends_on: - mybunker environment: - - DOCKER_HOST=tcp://docker-proxy:2375 + - DOCKER_HOST=tcp://bw-docker-proxy:2375 volumes: - bw-data:/data networks: - bw-universe - - net-docker + - bw-docker - docker-proxy: + bw-docker-proxy: image: tecnativa/docker-socket-proxy:0.1 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - CONTAINERS=1 networks: - - net-docker + - bw-docker myproxy: image: haproxy:2.7-alpine @@ -80,7 +72,7 @@ networks: config: - subnet: 10.20.30.0/24 bw-services: - net-docker: + bw-docker: net-proxy: ipam: driver: default diff --git a/examples/radarr/docker-compose.yml b/examples/radarr/docker-compose.yml index c6c790cc..1eed50fc 100644 --- a/examples/radarr/docker-compose.yml +++ b/examples/radarr/docker-compose.yml @@ -6,14 +6,6 @@ services: 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 - API_WHITELIST_IP=127.0.0.0/8 10.20.30.0/24 @@ -46,21 +38,21 @@ services: depends_on: - mybunker environment: - - DOCKER_HOST=tcp://docker-proxy:2375 + - DOCKER_HOST=tcp://bw-docker-proxy:2375 volumes: - bw-data:/data networks: - bw-universe - - net-docker + - bw-docker - docker-proxy: + bw-docker-proxy: image: tecnativa/docker-socket-proxy:0.1 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - CONTAINERS=1 networks: - - net-docker + - bw-docker radarr: image: lscr.io/linuxserver/radarr:4.2.4.6635-ls157 @@ -86,4 +78,4 @@ networks: config: - subnet: 10.20.30.0/24 bw-services: - net-docker: + bw-docker: diff --git a/examples/radarr/swarm.yml b/examples/radarr/swarm.yml index 28f4fb4d..4db47316 100644 --- a/examples/radarr/swarm.yml +++ b/examples/radarr/swarm.yml @@ -10,9 +10,9 @@ services: - PGID=1000 - TZ=Europe/London volumes: - - rr_config:/config - - rr_movies:/movies #optional - - rr_downloads:/downloads #optional + - rr-config:/config + - rr-movies:/movies #optional + - rr-downloads:/downloads #optional deploy: placement: constraints: @@ -39,6 +39,6 @@ networks: name: bw-services volumes: - rr_config: - rr_downloads: - rr_movies: + rr-config: + rr-downloads: + rr-movies: