DEV Community

Cover image for Docker-compose file for php development
Ismael Garcia
Ismael Garcia

Posted on • Edited on

Docker-compose file for php development

I'm starting to learn PHP in deep in these days, so i needed a small docker-compose file to create a small container that have the most essentials requirements for my PHP learning path.

  • PHP
  • MySQL
  • PhpMyAdmin

So here is the docker-compose.yml file for anyone you all to get up fast and easy docker container to test or develop in PHP.

version: "3.7"

services:
    php:
        image: php:7.2-apache
        ports: 
            - 8000:80
        volumes: 
            - ./www:/var/www/html
    database:
        image: mysql
        environment: 
            MYSQL_ROOT_PASSWORD: root
            MYSQL_USER: leamsigc.com
            MYSQL_PASSWORD: leamsigc.com
            MYSQL_DATABASE: leamsigc.com
    php-admin:
        image: phpmyadmin/phpmyadmin
        ports: 
            - 8001:80

Enter fullscreen mode Exit fullscreen mode
view raw socials.md hosted with ❤ by GitHub

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay