-
-
Notifications
You must be signed in to change notification settings - Fork 96
/
docker-compose.yml
68 lines (61 loc) · 1.33 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
63
64
65
66
67
68
version: '3'
services:
nginx:
image: nginx:latest
container_name: rest-api-slim-php-nginx-container
ports:
- "8081:80"
volumes:
- ./:/var/www/html
- ./docker/nginx/conf.d:/etc/nginx/conf.d
depends_on:
- php-fpm
php-fpm:
build: ./docker/php7
container_name: rest-api-slim-php-php-container
links:
- mysql
- redis
environment:
- PHP_FPM_ENABLE=1
- PHP_FPM_SERVER_ADDR=php
- PHP_FPM_SERVER_PORT=9000
- PHP_FPM_TIMEOUT=${HTTPD_TIMEOUT_TO_PHP_FPM:-180}
- DB_HOST=mysql
- DB_NAME=rest_api_slim_php
- DB_USER=root
- DB_PASS=
- DB_PORT=3306
volumes:
- ./:/var/www/html
redis:
image: redis:4.0.5-alpine
ports:
- 63790:6379
hostname: redis
volumes:
- redis-data:/data
mysql:
image: mysql:5.7
ports:
- 33060:3306
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_DATABASE: rest_api_slim_php
MYSQL_USER: root
MYSQL_PASSWORD:
MYSQL_ROOT_PASSWORD:
volumes:
- my-data:/var/lib/mysql
- ./database/database.sql:/docker-entrypoint-initdb.d/database.sql
phpmyadmin:
image: phpmyadmin/phpmyadmin
depends_on:
- mysql
ports:
- 8888:80
environment:
PMA_HOST: mysql
volumes:
redis-data:
my-data: