From dc3b0a76a746e8e89f08af7d53dee80563ed4f2f Mon Sep 17 00:00:00 2001 From: WP Studio Date: Tue, 6 Aug 2024 19:40:40 +0300 Subject: [PATCH] * close pma & inblucket ports + auth and example nginx config for local phpmyadmin service --- .gitignore | 3 ++- config/nginx/conf.d/z-pma.conf.example | 14 ++++++++++++++ config/nginx/includes.d/auth.conf | 5 +++++ docker-compose.base.yml | 9 --------- 4 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 config/nginx/conf.d/z-pma.conf.example create mode 100644 config/nginx/includes.d/auth.conf diff --git a/.gitignore b/.gitignore index 3850c5c..2b6a60a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ !/docker-compose*.example /docker-compose.nodejs.yml /.env -/*.komodoproject \ No newline at end of file +/*.komodoproject +/config/nginx/includes.d/auth.passwd \ No newline at end of file diff --git a/config/nginx/conf.d/z-pma.conf.example b/config/nginx/conf.d/z-pma.conf.example new file mode 100644 index 0000000..ab7a847 --- /dev/null +++ b/config/nginx/conf.d/z-pma.conf.example @@ -0,0 +1,14 @@ +server { + server_name pma.e2e.10ballov.ru; + listen 80; + include includes.d/auth.conf; + client_max_body_size 300M; + location / { + #resolver 127.0.0.11; + proxy_pass http://pma; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} \ No newline at end of file diff --git a/config/nginx/includes.d/auth.conf b/config/nginx/includes.d/auth.conf new file mode 100644 index 0000000..78b12ef --- /dev/null +++ b/config/nginx/includes.d/auth.conf @@ -0,0 +1,5 @@ +set $auth_basic Restricted; +auth_basic $auth_basic; +auth_basic_user_file includes.d/auth.passwd; +# Use openssl for generate basic password +# echo "MYUSER:$(openssl passwd -apr1 PASSWORD)" > auth.passwd \ No newline at end of file diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 8406174..2cf6963 100755 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -1,5 +1,3 @@ -version: '3.6' - services: nginx: image: nginx @@ -50,8 +48,6 @@ services: restart: always environment: MYSQL_ROOT_PASSWORD: 123456 - ports: - - "3306:3306" volumes: - database:/var/lib/mysql - ./hostfiles:/hostfiles @@ -64,14 +60,9 @@ services: PMA_HOST: db PMA_USER: root PMA_PASSWORD: 123456 - ports: - - "81:80" inbucket: image: inbucket/inbucket restart: always - ports: - - "2500:2500" - - "82:9000" redis: image: redis restart: always