-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (56 loc) · 1.65 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
version: '3'
services:
web:
image: nginx:stable-alpine
volumes:
- ./web/default.conf:/etc/nginx/conf.d/default.conf
- ./web/ssl:/etc/ssl
- ./www:/var/www/html
- ./web/default.template.conf:/etc/nginx/conf.d/default.template
ports:
- ${HTTP_PORT}:80
- ${HTTPS_PORT}:443
environment:
- WEB_HOST=${WEB_HOST}
command: /bin/sh -c "envsubst '$$WEB_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
depends_on:
- php-fpm
- php-cli
- mysql
php-fpm:
build: ./build/php-fpm
restart: always
volumes:
- ./php/fpm/:/usr/local/etc/php/conf.d/
- ./www:/var/www/html
php-cli:
build: ./build/php-cli
volumes:
- ./php/cli/:/usr/local/etc/php/conf.d/
- ./www:/var/www/html
composer:
image: composer
volumes:
- ./www:/app
command: install
adminer:
image: adminer
ports:
- ${ADMINER_PORT}:8080
restart: always
depends_on:
- mysql
mysql:
build: ./build/mysql
command: --default-authentication-plugin=mysql_native_password
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:
- ${MYSQL_PORT}:3306