How to host phpmyadmin as a single flyio app?

I wanna host a phpmyadmin on flyio, I actually have no clue on how the steps would be ?

Any help would be appreciated.

Hi,

I assume it’s because you have a MySQL database as a Fly app and want to manage that? If so, you don’t actually need to pay to run an extra app for phpmyadmin: you can use your local GUI of choice (depending on your OS there are a bunch of free ones) and proxy to that Fly-hosted database using e.g flyctl proxy 3306 -a my-mysql. Your local GUI could then connect to the Fly-hosted database using whatever port you specified e.g set the local GUI database hostname as 127.0.0.1:3306.

From Use a MySQL Database · Fly Docs

However if you really do need phpmyadmin, it looks like they have a Docker image pre-built. Handy. So you could make a file called Dockerfile and put in that:

FROM phpmyadmin:latest

Then you need to specify the environment variables so e.g it knows which database to connect to. Check out the docs for the supported ones:

https://docs.phpmyadmin.net/en/latest/setup.html

… of course for non-secret ones, you could use the [env] section within fly.toml. For secret ones (like your password) you would need to set those using fly secrets set NAME=VALUE.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.