docker compose up (log)
// server:8080
php_1 | NOTICE: PHP message: Xdebug: [Step Debug] Could not connect to debugging client. Tried: php:9003 (through xdebug.client_host/xdebug.client_port).
php_1 | 172.27.0.5 - 12/Jan/2023:13:56:08 +0300 "GET /index.php" 200
// http://server.local адрес не изменился
php_1 | NOTICE: PHP message: Xdebug: [Step Debug] Could not connect to debugging client. Tried: php:9003 (through xdebug.client_host/xdebug.client_port).
php_1 | 172.27.0.5 - 12/Jan/2023:13:56:11 +0300 "GET /index.php" 200
// server:8085 - по логину/паролю захожу в mysql
adminer_1 | [Thu Jan 12 10:56:18 2023] [::ffff:172.21.93.160]:52144 Accepted
adminer_1 | [Thu Jan 12 10:56:18 2023] [::ffff:172.21.93.160]:52144 [200]: GET /?server=mysql&username=db_user
adminer_1 | [Thu Jan 12 10:56:18 2023] [::ffff:172.21.93.160]:52144 Closing
adminer_1 | [Thu Jan 12 10:56:18 2023] [::ffff:172.21.93.160]:52145 Accepted
adminer_1 | [Thu Jan 12 10:56:18 2023] [::ffff:172.21.93.160]:52145 [200]: GET /adminer.css?v=402244250
adminer_1 | [Thu Jan 12 10:56:18 2023] [::ffff:172.21.93.160]:52145 Closing
// http://server.local/adminer - заходить отказывается
adminer_1 | [Thu Jan 12 10:56:26 2023] [::ffff:172.27.0.1]:53368 Accepted
adminer_1 | [Thu Jan 12 10:56:26 2023] [::ffff:172.27.0.1]:53368 <b>[403]</b>: GET //?server=mysql&username=db_user
adminer_1 | [Thu Jan 12 10:56:26 2023] [::ffff:172.27.0.1]:53368 Closing
adminer_1 | [Thu Jan 12 10:56:26 2023] [::ffff:172.27.0.1]:53372 Accepted
adminer_1 | [Thu Jan 12 10:56:26 2023] [::ffff:172.27.0.1]:53372 [200]: GET //adminer.css?v=402244250
adminer_1 | [Thu Jan 12 10:56:26 2023] [::ffff:172.27.0.1]:53372 Closing
adminer_1 | [Thu Jan 12 10:56:54 2023] [::ffff:172.27.0.1]:53378 Accepted
adminer_1 | [Thu Jan 12 10:56:54 2023] [::ffff:172.27.0.1]:53378 [302]: POST //?server=mysql&username=db_user
adminer_1 | [Thu Jan 12 10:56:54 2023] [::ffff:172.27.0.1]:53378 Closing
adminer_1 | [Thu Jan 12 10:56:54 2023] [::ffff:172.27.0.1]:53382 Accepted
adminer_1 | [Thu Jan 12 10:56:55 2023] [::ffff:172.27.0.1]:53382 <b>[403]</b>: GET //?server=mysql&username=db_user
adminer_1 | [Thu Jan 12 10:56:55 2023] [::ffff:172.27.0.1]:53382 Closing
adminer_1 | [Thu Jan 12 10:56:55 2023] [::ffff:172.27.0.1]:53386 Accepted
adminer_1 | [Thu Jan 12 10:56:55 2023] [::ffff:172.27.0.1]:53386 [200]: GET //adminer.css?v=402244250
adminer_1 | [Thu Jan 12 10:56:55 2023] [::ffff:172.27.0.1]:53386 Closing
apache VirtualHost:
<VirtualHost *:80>
ProxyPreserveHost On
ServerName server.local
ProxyPass /adminer http://127.0.0.1:8085/
ProxyPassReverse /adminer http://127.0.0.1:8085/
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
docker-compose.yml
version: '3'
services:
web:
image: nginx
restart: always
ports:
- "8080:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./app:/www/app
- ./log/:/var/log/nginx
command: [nginx-debug, '-g', 'daemon off;']
php:
build:
context: .
dockerfile: PHP_Dockerfile
ports:
- 8443:8443
- 9000:9000
volumes:
- ./code-server:/root/.config/code-server
- ./app:/www/app
- ./xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
environment:
PHP_IDE_CONFIG: "serverName=docker-test"
mysql:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'secret'
MYSQL_USER: 'db_user'
MYSQL_PASSWORD: 'secret'
MYSQL_DATABASE: 'test'
volumes:
- mysqldata:/var/lib/mysql
ports:
- 8081:3306
adminer:
image: adminer:latest
restart: always
environment:
ADMINER_DESIGN: ng9
ADMINER_DEFAULT_SERVER: mysql
ports:
- 8085:8080
volumes:
mysqldata: {}