How to launch and deploy an app that requires multiple steps?

Hello,

I’d like to deploy a docker image that needs 3 steps:

  1. docker run --name mysql -e MYSQL_ROOT_PASSWORD=xxx -d mysql

  2. docker volume create data

  3. docker run -d -p 443:8088 --name myapp --link mysql:db -v data:/var/www/html -e GROUP_ID=33 -e PORT=443 --restart always online_image_path

I’m a newbie in the cloud. How can I launch and deploy my app using flyctl that requires the above 3 steps?

Let me replay back to you what I’m reading and you can correct me if something seems off. It looks like you’re looking to boot a MySQL instance, then boot a web app that has a volume. Let’s break that up a bit.

For running a MySQL instance I’d check here Use a MySQL Database · Fly Docs that should get you rolling. Though, running a database on your own can be a bit much, so if you just need something you can boot quickly, I would also consider one of the more database-focused solutions like https://planetscale.com.

For the volume piece, you should be able to get started here: Volumes · Fly Docs

Once the volume’s created, you can setup your app with fly. I would try just walking through Speedrun! Deploying to Fly.io! · Fly Docs and go from there. Once you have this app created, with a fly.toml you’ll be able to map your volume location, update your env, and configure your port mapping.

Thank you for your post.