What is a Fly application?
Your Laravel application is a Fly application, which means it has the following few things:- A
fly.tomlfile in the root directory - A
Dockerfilein the root directory that describes the image - A “server” running on Fly’s infrastructure.
Creating a Fly application within a Fly application
The important thing about creating multiple Fly applications within a project is keeping them organized. For our example, we’ll setup a Laravel server application and keep it in the./fly/applications folder within our project repo.
Let’s get started by running the following commands:
fly/applications/redis folder, run:
Dockerfile and fly.toml file that can be further configured for your application’s needs.
Next, we can do some light configuration and then deploy the application:
Accessing from the root application
Fly creates DNS hosts for each of your applications based on the application name. For this example, we can reach the Redis instance via hostnamemy-project-name.internal.