In the Dockerfile, a new command has been added to install git. This allows for more flexibility in managing code versions within the container. In addition, a new endpoint '/version' has been introduced in index.php which returns JSON data about the last commit, its timestamp and the current branch. This provides an easy way to check versioning information directly from the application.
This commit introduces a new Dockerfile that sets up a PHP 8.3 environment with Apache. It includes the following significant changes:
- Sets the working directory to /var/www/html
- Copies current directory contents into the container
- Installs Composer and activates mod_rewrite
- Installs Process Control extension using curl command
- Runs composer install to fetch dependencies
- Exposes port 9050 and modifies Apache configuration to listen on this port
- Adds environment variables to Apache configuration
- Changes ownership of /var/www/html to www-data user
- Starts the Apache server using apache2-foreground command