3 years ago
I'm trying to deploy a PHP container using MySQL, and it is crashing like
PHP Warning: mysqli_connect(): php_network_getaddresses: getaddrinfo for mysql.railway.internal failed: Temporary failure in name resolution in /wait-for-db.php on line 12
PHP Fatal error: Uncaught mysqli_sql_exception: php_network_getaddresses: getaddrinfo for mysql.railway.internal failed: Temporary failure in name resolution in /wait-for-db.php:12ENABLE_ALPINE_PRIVATE_NETWORKING is set to true and
77 Replies
3 years ago
8f297c52-c464-41f8-be1a-748322966bed
3 years ago
I tried removing the alpine part and ```
PHP Warning: mysqli_connect(): php_network_getaddresses: getaddrinfo for mysql.railway.internal failed: Name or service not known in /wait-for-db.php on line 12
PHP Fatal error: Uncaught mysqli_sql_exception: php_network_getaddresses: getaddrinfo for mysql.railway.internal failed: Name or service not known in /wait-for-db.php:12
3 years ago
Maybe if I insert a sleep into the start command
3 years ago
even though wait for db shouldn't be doing that
3 years ago
nice that went even better
3 years ago
yeah wait it shouldn't be doing this because
3 years ago
hmm Uncaught mysqli_sql_exception: Connection refused in /wait-for-db.php:12
3 years ago
alright well this was incredibly cursed but we chillin now
3 years ago
Brody you are going to love this template let me tell you
3 years ago
will I though?
3 years ago
I have insanely high standards
3 years ago
yes you will love it
3 years ago
47 service variables that are set incorrectly 🙂
3 years ago
currently fighting apache
3 years ago
I think I will livepatch the apache configuration inside of the start command
3 years ago
because i'm just scrappy like that
3 years ago
you wouldn't be the first
3 years ago
this is gonna work /bin/sh -c "echo \"ServerName 0.0.0.0\" >> /etc/apache2/apache2.conf && sleep 3 && /entrypoint.sh"
3 years ago
well, it worked more than it did last time
3 years ago
why does the server name matter?
3 years ago
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.2.124. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.2.124. Set the 'ServerName' directive globally to suppress this message
[Mon May 06 00:11:12.371710 2024] [mpm_prefork:notice] [pid 88] AH00163: Apache/2.4.59 (Debian) PHP/8.2.18 configured -- resuming normal operations
[Mon May 06 00:11:12.371779 2024] [core:notice] [pid 88] AH00094: Command line: 'apache2 -D FOREGROUND'3 years ago
with this, it still doesn't work, but at least it doesn't show this error
3 years ago
it's just a warning, it shouldn't actually matter
3 years ago
but the 3 second sleep is needed
3 years ago
maybe, but I'm still trying to get it to show up. Does railway support port 80?
3 years ago
BASED
3 years ago
bruv
3 years ago
mf be telling me theres a 500 error but then it not given me the 500 error
3 years ago
3 years ago
what is railway doing
3 years ago
how didn't this get transformed
3 years ago
the question is what are you doing, that doesn't generate a valid base64 string on its own
3 years ago
you also need to use double quotes
3 years ago
o i shoulda used lower
3 years ago
I'm doing this because you can't do multiple mounts
3 years ago
3 years ago
@Brody any idea why the secret generator in the template isn't working?
3 years ago
3 years ago
comes in like this
3 years ago
is that a screenshot from the service in your project or the template?
3 years ago
the first one is the template, the second is the service
3 years ago
in that case, I think I've already answered that question 😉
3 years ago
you can't generate screenshots from the template?
3 years ago
oh
3 years ago
double quotes?
3 years ago
I swear singles worked before
3 years ago
lol what
3 years ago
i meant secrets
3 years ago
sorry
3 years ago
the docs show single quotes
3 years ago
docs aren't always a single source of truth, but I am
3 years ago
fat ah ego :P
you oughta pass this one along probably
3 years ago
I should
3 years ago
another thing that should be fixed is
3 years ago
there is a slight delay between when a template is saved
3 years ago
and when the "create project" screen reflects that change
3 years ago
i think? a reload fixes that
3 years ago
that's just cache haha, hard refresh fixes it
3 years ago
yeah but its lowkey hard to get used to, if they use react they could hook into the context provider
3 years ago
they do use react lol, it's not as simple as you think
3 years ago
either way, your template doesn't use the private host and port for either mysql or redis
3 years ago
oh yeah thats because I was having issues with netowrking ^^^ and i forgot to change, I'll do that now
3 years ago
I mean I've done this sort of thing before
3 years ago
little more complex with what railway is doing
3 years ago
What is railway doing? There's not much going on with the frontend at least
3 years ago
not saying it couldn't be done, but it's likely just not worth it at this time
3 years ago
you're funny
3 years ago
Yeah, I'm sure they have bigger priorities
3 years ago
It's literally just a bog standard frontend application?
3 years ago
The only unique thing about it is the canvas
3 years ago
you're real funny
3 years ago
What am I missing
3 years ago
a whole lot
3 years ago
like?
3 years ago
far outside the scope of this thread
3 years ago
alright lol