forked from hellmrf/docker-lamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
24 lines (24 loc) · 1.04 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
services:
web:
image: php:8.2-apache # check the php version you need for your project
ports:
- "80:80" # this line maps your pc port to the container (Apache) port
depends_on:
- db # this line links this container to the db container
volumes:
- ./public:/var/www/html #this line maps the content of ./public in your pc to the /var/www/html of the container
db:
image: mysql:8.2.0 # check the mysql version you need for your project
environment:
MYSQL_ROOT_PASSWORD: root # you can change the mysql root password here
MYSQL_DATABASE: lamp_db # you can change the database name here
volumes:
- ./mysql_data:/var/lib/mysql #this line maps the content of ./mysql_data in your pc to the /var/lib/mysql of the container
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8080:80" # this line maps your pc port (8080) to the container port (80)
depends_on:
- db # this line links this container to the db container
environment:
PMA_HOST: db