-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 1.3 KB
/
docker-compose.yml
File metadata and controls
52 lines (47 loc) · 1.3 KB
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
version: '2.1'
services:
nginx:
image: nginx:latest
ports:
- "${APP_PORT}:80"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./logs/nginx:/var/log/nginx:rw
volumes_from:
- app:ro
depends_on:
- php
- app
restart: "${APP_RESTART}"
php:
build: ./php/
expose:
- "9000"
volumes:
- ./php/php.ini:/usr/local/etc/php/php.ini:ro
volumes_from:
- app:rw
depends_on:
- app
restart: "${APP_RESTART}"
app:
image: php:7-fpm
volumes:
- "${APP_ROOT}:/var/www/html:rw"
command: 'true'
restart: "${APP_RESTART}"
database:
image: mysql:latest
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
expose:
- "3306"
volumes:
- data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_USER: "${DB_USER}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
restart: "${APP_RESTART}"
volumes:
data: