Hello, I have no idea what I’m doing wrong!
I’m running Wordpress in one container, and Maria DB in another.
Wordpress is incredibly slow and also often just redirects to a Error establishing a database connection screen with the following debug message:
Warning: mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/html/wp-includes/wp-db.php on line 1753 Warning: mysqli_real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/html/wp-includes/wp-db.php on line 1753
php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
I was hoping for an easy setup and not really sure what I’m doing but these are my two toml files:
Wordpress:
# fly.toml file generated for ias on 2022-09-13T17:29:38+02:00
app = "ias"
kill_signal = "SIGINT"
kill_timeout = 5
[mounts]
source = "ias_wp_content"
destination = "/var/www/html"
[env]
WORDPRESS_DB_HOST = "wp-maria.internal"
WORDPRESS_DB_NAME = "wordpress"
WORDPRESS_DB_USER = REDACTED
WORDPRESS_TABLE_PREFIX = "ias_"
WORDPRESS_DEBUG = 1
[build]
image = "designbyadrian/wordpress:php7.4-apache-amd"
[[services]]
internal_port = 80
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
DB:
# fly.toml file generated for wp-maria on 2022-09-13T16:41:11+02:00
app = "wp-maria"
kill_signal = "SIGINT"
kill_timeout = 5
[mounts]
source = "mariadata"
destination = "/data"
[env]
MARIADB_DATABASE = "wordpress"
MARIADB_USER = REDACTED
[build]
image = "mariadb:10"
[experimental]
cmd = [
"--datadir","/data/maria"
]
In this post, I’ve with help figured out that the two containers can talk to each other, but something is just off.