-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
122 lines (112 loc) · 2.91 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '3.5'
networks:
shared:
name: shared
volumes:
mysql:
driver: ${VOLUMES_DRIVER}
services:
# nginx
nginx:
build:
context: ./nginx
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- APP_USER=${APP_USER}
container_name: ${PREFIX}_${NGINX_CONTAINER_NAME}
restart: always
volumes:
- ${APP_PATH}:/var/www/html
- ./nginx/conf.d/:/etc/nginx/conf.d/
- ./.data/logs-nginx/:/var/log/nginx
- ./nginx/ssl/:/etc/nginx/ssl/
ports:
- "${NGINX_CONTAINER_PORT_HTTP}:80"
- "${NGINX_CONTAINER_PORT_HTTPS}:443"
environment:
- APP_DOMAIN=${APP_DOMAIN}
- NGINX_CONTAINER_PHP_UPSTREAM_NAME=${NGINX_PHP_UPSTREAM_CONTAINER_NAME}
- NGINX_CONTAINER_PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_CONTAINER_PORT}
- NGINX_CONTAINER_PROJECT_PATH=${NGINX_CONTAINER_PROJECT_PATH}
depends_on:
- php-fpm
networks:
- shared
## PHP-FPM
php-fpm:
build:
context: ./php-fpm
dockerfile: ${PHP_CONTAINER_VERSION}.Dockerfile
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- APP_USER=${APP_USER}
container_name: ${PREFIX}_${PHP_CONTAINER_NAME}
restart: always
volumes:
- ${APP_PATH}:/var/www/html
- ./php-fpm/php${PHP_CONTAINER_VERSION}.ini:/usr/local/etc/php/php.ini
expose:
- ${PHP_CONTAINER_PORT}
environment:
- PHP_IDE_CONFIG=xapp_network
depends_on:
- composer
networks:
- shared
## Composer
composer:
build:
context: ./composer
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
- APP_USER=${APP_USER}
container_name: ${PREFIX}_${COMPOSER_CONTAINER_NAME}
volumes:
- ${APP_PATH}:/var/www/html
working_dir: /var/www/html
user: ${APP_USER}
command: composer install --ignore-platform-reqs
networks:
- shared
## MYSQL
mysql:
image: mariadb:latest
container_name: ${PREFIX}_${MYSQL_CONTAINER_NAME}
restart: always
tty: true
expose:
- ${MYSQL_CONTAINER_PORT}
environment:
- MYSQL_DATABASE=${MYSQL_CONTAINER_DATABASE}
- MYSQL_USER=${MYSQL_CONTAINER_USER}
- MYSQL_PASSWORD=${MYSQL_CONTAINER_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_CONTAINER_ROOT_PASSWORD}
volumes:
- ./.data/mysql:/var/lib/mysql
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
networks:
- shared
# PHPMyAdmin
phpmyadmin:
image: phpmyadmin
container_name: ${PREFIX}_${PHPMYADMIN_CONTAINER_NAME}
restart: always
ports:
- ${PHPMYADMIN_CONTAINER_PORT}
environment:
- PMA_ARBITRARY=1
networks:
- shared
# MAILDEV
maildev:
build: ./maildev
container_name: ${PREFIX}_${MAILDEV_CONTAINER_NAME}
restart: always
ports:
- "${MAILDEV_CONTAINER_HTTP_PORT}:80"
- "${MAILDEV_CONTAINER_SMTP_PORT}:25"
networks:
- shared