https://github.com/dendrofen/docker-compose-php-apache-mail
Docker Compose development environment for php. Project folder storing files and mail testing tool available.
https://github.com/dendrofen/docker-compose-php-apache-mail
apache-docker docker docker-compose docker-environment docker-mail mailhog-docker php-docker php-mailer-smtp
Last synced: 11 months ago
JSON representation
Docker Compose development environment for php. Project folder storing files and mail testing tool available.
- Host: GitHub
- URL: https://github.com/dendrofen/docker-compose-php-apache-mail
- Owner: dendrofen
- Created: 2022-12-24T03:50:11.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-03T23:14:41.000Z (almost 3 years ago)
- Last Synced: 2025-01-15T13:07:29.735Z (about 1 year ago)
- Topics: apache-docker, docker, docker-compose, docker-environment, docker-mail, mailhog-docker, php-docker, php-mailer-smtp
- Language: PHP
- Homepage:
- Size: 88.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Docker Compose PHP Apache + Mailhog
Docker Compose project to deploy development environment for PHP. Configured to store files changes locally in project folder matching the purpose of completely storing project in github. Additionally empowered with [Mailhog](https://github.com/mailhog/MailHog) - email testing tool.
## Features
- 📦 PHP Apache and Email Testing
- 🗂️ File changes storing in project folder
- 🚀 Commit changes to github repository
**For development purpose only, don't use in production.**
## 🚀 Getting Started
### 1. Clone repository
```bash
git clone https://github.com/dendrofen/docker-compose-php-apache-mail.git
```
### 2. Docker compose
Run docker compose in cloned project folder
```bash
docker-compose up -d
```
❗️ **Note:** Default docker compose is for Apple Silicon chips, form AMD use following:
```bash
docker-compose -f docker-compose.amd.yml up -d
```
### 3. Start your changes
Once docker-compose run completed, you are free to make changes under www folder.
## 🔗 Interface links
- **Server**
- [http://localhost/](http://localhost/)
- **Mailhog**
- [http://localhost:8025/](http://localhost:8025/)
## 🧑🏻💻 PHP Environment
### Project Structure
Folder www contains files using on server, this should be considered as root server directory. All changes should be made under this directory.
### Composer
Project contains composer preinstalled with psr-4 autoload. Composer will build modules every docker container start, or you can do manage it manually using container console.
### Mailer demo
Project contains mailer demo fibric class, in **www/src/Mailer.php**. Mailer functional using [PHPMailer](https://github.com/PHPMailer/PHPMailer). Every index page reload there is new demo email send, code in **www/src/Home.php**.
### Persisted www
Changes per this directory would be synced with docker container as normally called - volume persistance. Your changes would be live-synced with docker container and visa-versa.
### PHP settings
**.docker/php.ini** file includes settings for php
❗️ **Note:** Reload the container to see changes if modified