From 91ed88c759f5694a64a5da1ca2e79044abfc5b13 Mon Sep 17 00:00:00 2001 From: baiobelfer Date: Wed, 23 Oct 2024 14:04:34 +0200 Subject: [PATCH] lamp docker compose --- Dockerfile | 2 ++ docker-compose.yaml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93494af --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM php:7.4.3-apache +RUN docker-php-ext-install mysqli pdo pdo_mysql diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..cd77b3e --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,36 @@ +version: "3.7" +services: + + web-server: + build: + dockerfile: ./Dockerfile + context: . + restart: always + volumes: + - "./html/:/var/www/html/" + ports: + - "8080:80" + + mysql-server: + image: mysql:8.0.19 + restart: always + environment: + MYSQL_ROOT_PASSWORD: secret + volumes: + - mysql-data:/var/lib/mysql + ports: + - "3306:3306" + + phpmyadmin: + image: phpmyadmin/phpmyadmin:5.0.1 + restart: always + environment: + PMA_HOST: mysql-server + PMA_USER: root + PMA_PASSWORD: secret + ports: + - "5000:80" + +volumes: + mysql-data: +