-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
49 lines (46 loc) · 1.1 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.9'
services:
nginx:
image: nginx:latest
ports:
- '80:80'
volumes:
- ./my-project:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
php:
image: php:8.0-fpm
volumes:
- ./my-project:/var/www/html
- ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
depends_on:
- mysql
environment:
- MYSQL_HOST=mysql
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
mysql:
image: mariadb:latest
restart: unless-stopped
ports:
- '3306:3306'
volumes:
- ./mysql:/etc/mysql/conf.d
- ./mysql/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
ports:
- '8080:80'
depends_on:
- mysql
environment:
PMA_HOST: mysql
PMA_USER: ${MYSQL_USER}
PMA_PASSWORD: ${MYSQL_PASSWORD}