A simple docker-compose project for quickly prototyping PHP apps.
- Clone this repository.
git clone https://github.com/JorgenVatle/docker-compose-php.git
- Place your .php files into the
public/
directory.
docker-compose up
Once started, you'll have access to your app on localhost:8050
A MySQL server is exposed on localhost:8051
On localhost:
Host: localhost
Port: 8051
Database: compose_php
Username: root
Password: N/A
When connecting to MySQL within your app, use the following credentials:
Host: db
Port: 3306
Database: compose_php
Username: root
Password: N/A
Available on localhost:8050
Within Docker: web:80
Available only within Docker on php-fpm:9000