Deploying PHP and Composer on Flightcontrol
Generally speaking, your PHP/Composer applications should deploy on Flightcontrol without any special configuration.
However, there are a few things you should be aware of before setting up your Flightcontrol project.
Flightcontrol uses the Nixpacks PHP Provider (opens in a new tab) to deploy your application. By default, Flightcontrol will use version 8.2 of PHP. The other two options are 8.1 and 8.0. Applications on PHP 7 or below will need to be upgraded, as these versions are past the end of their support life.
Flightcontrol uses Nginx as the web server for your PHP web application.
You can provide your own
nginx.conf file, or you can provide your own
nginx.template.conf file, based on the syntax and structure of the Nixpacks PHP Provider Nginx Template (opens in a new tab)
If you need a Flightcontrol account, sign up at the Flightcontrol Dashboard (opens in a new tab).
You'll also need to have your PHP application in a GitHub repository - either private or public.
After setting up your Flightcontrol account, start a new project and connect Flightcontrol's GitHub app to your repository. For step-by-step instructions on this process, see our Connecting GitHub guide.
You will need to set up an environment within the project to hold your web service. This could be the "Production" environment, for instance.
Inside of that environment, you will need to add a "Web Server" service.
After you save and deploy the project, Flightcontrol will spin up an ECS Fargate instance, and make it available to you on a publicly available URL.
Flightcontrol supports MySQL, PostgreSQL, and MariaDB databases through AWS Relational Database Service (RDS). If you need Redis, Flightcontrol can also deploy a Redis instance for your project with AWS ElastiCache.
If you add a database or Redis instance to your project, Flightcontrol will automatically add the appropriate environment variables (
REDIS_URL) to your environment to connect to the database or Redis instance. You can also customize the environment variable names or get the connection strings directly if needed.
After you get the project successfully deployed, commit another change to the
main branch of your GitHub repository and see the changes build and deploy to your Fargate instance. After the initial provisioning process, subsequent commits will deploy much faster.
If you need help deploying your PHP/Composer application on Flightcontrol, reach out to us and we'll be happy to help you get your project up and running with Flightcontrol.