Let’s get a better overview: This is my docker-compose.yml
---
version: "3"
networks:
invoiceplane:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.25.0.0/17
volumes:
invoiceplane-db:
driver: "local"
nginx_logs:
driver: "local"
services:
# --- PHP 8.1
php:
container_name: "invoiceplane-php"
build:
context: ./resources/docker/php-fpm
args:
- PUID=1000
- PGID=1000
- TZ=UTC
links:
- db
expose:
- "9000"
dns: 8.8.8.8
depends_on:
- db
networks:
invoiceplane:
ipv4_address: 172.25.0.11
volumes:
- .:/var/www/projects/invoiceplane:delegated
- ./resources/docker/php-fpm/php-dev.ini:/usr/local/etc/php/php.ini
# --- nginx 1.23
nginx:
container_name: "invoiceplane-nginx"
build:
context: ./resources/docker/nginx
links:
- php
ports:
- "8083:80"
dns: 8.8.8.8
depends_on:
- php
networks:
invoiceplane:
ipv4_address: 172.25.0.12
volumes:
- .:/var/www/projects/invoiceplane:delegated
- nginx_logs:/var/log/nginx
- ./resources/docker/nginx/invoiceplane.conf:/etc/nginx/conf.d/invoiceplane.conf:ro
# --- MariaDB 10.9
db:
container_name: "invoiceplane-db"
build:
context: ./resources/docker/mariadb
environment:
- MARIADB_ROOT_PASSWORD=ipdevdb
- MARIADB_USER=ipdevdb
- MARIADB_PASSWORD=ipdevdb
- MARIADB_DATABASE=invoiceplane_db
ports:
- "3306:3306"
networks:
invoiceplane:
ipv4_address: 172.25.0.13
volumes:
- "invoiceplane-db:/var/lib/mysql"
phpmyadmin:
container_name: "invoiceplane-dbadmin"
build:
context: ./resources/docker/phpmyadmin
environment:
- PMA_HOST=invoiceplane-db
#- PMA_USER=root
#- PMA_PASSWORD=ipdevdb
#- PMA_ROOT_PASSWORD=ipdevdb
- MYSQL_DATABASE=invoiceplane_db
- MYSQL_USER=ipdevdb
- MYSQL_PASSWORD=ipdevdb
- MYSQL_ROOT_PASSWORD=ipdevdb
- MAX_EXECUTION_TIME=600
- MEMORY_LIMIT=256M
- UPLOAD_LIMIT=2G
depends_on:
- db
links:
- db
restart: always
volumes:
- ./resources/docker/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
- ./resources/docker/databases:/var/www/html/tmp/upload_databases
ports:
- "8086:80"
networks:
invoiceplane:
ipv4_address: 172.25.0.16
As you can see i needed to change some ports, for example the nginx is running on host port 8083
, so i should get to the web overlay with hostname:8083
.Open this in my browser redirects me to http://172.25.0.12/index.php/welcome
which of course doesn’t exist and gives me a connection timeout error.
Edit: If i edit the ipconfig.php
like this IP_URL=http://hostname
the redirection truly works as it redirects to https://hostname/index.php/welcome
- even if https
is wrong (local usage, no need for ssl) and i still get connection error.
But hostname:8086
is opening the phpmyadmin overlay as expected (thus i can’t login there with ipdevdb:ipdevdb
→ mysqli::real_connect(): (HY000/2002): No such file or directory
). I think this is because my database (mariadb) is not running (exited) with this error:
2023-07-02 09:18:25+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:11.0.2+maria~ubu2204 started.
2023-07-02 09:18:25+00:00 [ERROR] [Entrypoint]: mariadbd failed while attempting to check config
command was: mysqld --verbose --help
/usr/local/bin/docker-entrypoint.sh: line 105: mysqld: command not found
So all in all there is this Entrypoint
error related to the mariadb and this redirection to a ipadress which doesn’t exists. The main issue should be mysqld --verbose --help
because mysqld
doesn’t exist as a command (even if its defined and also like that on my fs?).
I don’t know if this is related but the docker-compose.yml
is talking about MariaDB 10.9 even though it is using the latest version which is 11.0.2
with the latest tag.