ajout app docker LAMP

This commit is contained in:
Your Name 2023-03-30 22:03:38 +00:00
parent 43e8eb5911
commit 13213e4bf7

View File

@ -0,0 +1,32 @@
version: "3.9"
services:
php:
container_name: php
# image: php:apache
build: './php'
restart: always
ports:
- "8000:80"
volumes:
- ./code:/var/www/html
depends_on:
- db
env_file:
- .env
db:
container_name: db
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ./db:/var/lib/mysql
- ./db-init:/docker-entrypoint-initdb.d
env_file:
- .env