-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (42 loc) · 1.19 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
# see https://dockerfile.readthedocs.io/en/latest/content/DockerImages/dockerfiles/php-apache-dev.html
# see for connecting php-cli with mysql
# https://stackoverflow.com/questions/39678099/docker-compose-php-fpm-nginx-mysql-and-use-wp-cli-on-nginx
version: '3'
services:
apache2:
build: ./phpdocker/php-apache-dev
env_file:
- ".env"
volumes:
- .:/app
ports:
- 8000:80
- 8443:443
depends_on:
- mysql
mysql:
image: mysql:5
container_name: ${MYSQL_HOST}
restart: always
env_file:
- ".env"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
ports:
- "3306"
volumes:
- ./data/db/mysql:/var/lib/mysql
myadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
ports:
- "8080:80"
environment:
- PMA_ARBITRARY=1
- PMA_HOST=${MYSQL_HOST}
restart: always
depends_on:
- mysql