-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
169 lines (157 loc) · 5.09 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
version: "3"
networks:
backend:
driver: ${NETWORKS_DRIVER}
volumes:
adminer:
driver: ${VOLUMES_DRIVER}
mariadb:
driver: ${VOLUMES_DRIVER}
redis:
driver: ${VOLUMES_DRIVER}
services:
### Workspace Utilities ##################################
workspace:
build:
context: ./workspace
args:
- UBUNTU_SOURCE=${UBUNTU_SOURCE}
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
- NVM_NODEJS_ORG_MIRROR=${WORKSPACE_NVM_NODEJS_ORG_MIRROR}
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
- INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI}
- INSTALL_OCI8=${WORKSPACE_INSTALL_OCI8}
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
- INSTALL_PRESTISSIMO=${WORKSPACE_INSTALL_PRESTISSIMO}
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
- INSTALL_YAML=${WORKSPACE_INSTALL_YAML}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
- TZ=${TIMEZONE}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
# - ./php-worker/supervisord.d:/etc/supervisord.d
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
tty: true
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
- DOCKER_HOST=tcp://docker-in-docker:2375
networks:
- backend
### NGINX Server #########################################
nginx:
build:
context: ./nginx
args:
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
- "${NGINX_HOST_HTTPS_PORT}:443"
networks:
- backend
depends_on:
- php-fpm
### MariaDB ##############################################
mariadb:
build:
context: ./mariadb
args:
- MARIADB_VERSION=${MARIADB_VERSION}
- TZ=${TIMEZONE}
volumes:
- ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
ports:
- "${MARIADB_PORT}:3306"
environment:
- TZ=${TIMEZONE}
- MYSQL_DATABASE=${MARIADB_DATABASE}
- MYSQL_USER=${MARIADB_USER}
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
networks:
- backend
### Redis ################################################
redis:
build: ./redis
volumes:
- ${DATA_PATH_HOST}/redis:/data
ports:
- "${REDIS_PORT}:6379"
networks:
- backend
### PHP-FPM ##############################################
php-fpm:
build:
context: ./php-fpm
args:
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
- INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
- INSTALL_OCI8=${PHP_FPM_INSTALL_OCI8}
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
- INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
- PUID=${PHP_FPM_PUID}
- PGID=${PHP_FPM_PGID}
- LOCALE=${PHP_FPM_DEFAULT_LOCALE}
volumes:
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
expose:
- "9000"
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
- DOCKER_HOST=tcp://docker-in-docker:2375
depends_on:
- workspace
networks:
- backend
### Docker-in-Docker ################################################
docker-in-docker:
image: docker:dind
privileged: true
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${DATA_PATH_HOST}/dind:/var/lib/docker
expose:
- 2375
networks:
- backend
### Adminer ###########################################
adminer:
build:
context: ./adminer
ports:
- "${ADM_PORT}:8080"
networks:
- backend
depends_on:
- php-fpm
- mariadb