-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
62 lines (62 loc) · 1.69 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
50
51
52
53
54
55
56
57
58
59
60
61
62
version: "3"
services:
php-apache:
build:
context: .
dockerfile: ./php-apache/Dockerfile
ports:
- "${HOST_MACHINE_UNSECURE_HOST_PORT}:80"
- "${HOST_MACHINE_SECURE_HOST_PORT}:443"
expose:
- "9000"
container_name: ${CONTAINER_PREFIX}.php
domainname: ${CONTAINER_PREFIX}.php
hostname: ${CONTAINER_PREFIX}.php
depends_on:
- mysql
volumes:
- ./www:/var/www/html
- ./php-apache/conf/php/php.ini:/usr/local/etc/php/conf.d/php.ini
restart: always
links:
- mysql:mysql
networks:
- default
mysql:
image: mysql:5.7
container_name: ${CONTAINER_PREFIX}.mysql
domainname: ${CONTAINER_PREFIX}.mysql
hostname: ${CONTAINER_PREFIX}.mysql
ports:
- "${HOST_MACHINE_MYSQL_PORT}:3306"
expose:
# Opens port 3306 on the container
- '3306'
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- ./mysql/db:/var/lib/mysql
- ./mysql/provision:/docker-entrypoint-initdb.d
restart: always
networks:
- default
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: ${CONTAINER_PREFIX}.phpmyadmin
domainname: ${CONTAINER_PREFIX}.phpmyadmin
hostname: ${CONTAINER_PREFIX}.phpmyadmin
depends_on:
- mysql
links:
- mysql:db
ports:
- ${HOST_MACHINE_PHPMYADMIN_PORT}:80
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_ROOT_PASSWORD}
restart: always