lamp docker compose

This commit is contained in:
baiobelfer 2024-10-23 14:04:34 +02:00
commit 91ed88c759
2 changed files with 38 additions and 0 deletions

2
Dockerfile Normal file
View File

@ -0,0 +1,2 @@
FROM php:7.4.3-apache
RUN docker-php-ext-install mysqli pdo pdo_mysql

36
docker-compose.yaml Normal file
View File

@ -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: