How to set up a PHP dev environment on Docker (With MySQL and PHPMyAdmin)

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024
  • docker-compose.yml:
    version: '3.8'
    services:
    apache-php:
    image: apache-mysqli
    build:
    context: .
    dockerfile: Dockerfile
    volumes:
    C:/php_ws/abstract-programmer:/var/www/html
    ports:
    "80:80"
    networks:
    app-network
    mysql:
    image: mysql
    volumes:
    C:/php_ws/DB:/var/lib/mysql
    environment:
    MYSQL_ROOT_PASSWORD: pw
    networks:
    app-network
    phpmyadmin:
    image: phpmyadmin
    environment:
    PMA_HOST: mysql
    ports:
    "8080:80"
    depends_on:
    mysql
    networks:
    app-network
    networks:
    app-network:
    driver: bridge

Комментарии • 6

  • @complx501
    @complx501 2 месяца назад

    Just want to extend my thanks for this awesome tutorial, very straight forward and easy to follow with clear explanations. I was having trouble following other guides in getting my phpmyadmin and mysql to work, I have noticed this is because the PMA host was not linked corectly. The additional info for docker compose was very helpful and insigthful in using the volumes. Awesome Job and thanks once again.

    • @absprog
      @absprog  2 месяца назад

      Thank you for your feedback!👍

  • @olddfacenor
    @olddfacenor Месяц назад

    thanks very very much for this tutorial its help me a lot

    • @absprog
      @absprog  Месяц назад

      Glad to hear that

  • @phoolherreracondezo2841
    @phoolherreracondezo2841 Месяц назад

    you rock bro, thanks a lot baby