-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
167 lines (153 loc) · 4.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
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
services:
# --------------------------------------------------------------------------
# Workspace Utilities Container
# --------------------------------------------------------------------------
workspace:
container_name: crb_dock_workspace
build:
context: ./workspace
args:
- PGID=${WORKSPACE_PGID}
- PUID=${WORKSPACE_PUID}
- TZ=${WORKSPACE_TIMEZONE}
- INSTALL_CARGO=${WORKSPACE_INSTALL_CARGO}
- INSTALL_SSH=${WORKSPACE_INSTALL_SSH}
- http_proxy
- https_proxy
- no_proxy
volumes:
- ${APPLICATION}:${APPLICATION_LOCATION}
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
tty: true
networks:
- internal
# --------------------------------------------------------------------------
# PHP-FPM Container
# --------------------------------------------------------------------------
php-fpm:
container_name: crb_dock_php
build:
context: ./php-fpm
args:
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
- INSTALL_CALENDAR=${PHP_FPM_INSTALL_CALENDAR}
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
- INSTALL_GD=${PHP_FPM_INSTALL_GD}
- INSTALL_IMAGICK=${PHP_FPM_INSTALL_IMAGICK}
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
- INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
- INSTALL_OPCACHE=${PHP_FPM_INSTALL_OPCACHE}
- INSTALL_PHPREDIS=${PHP_FPM_INSTALL_PHPREDIS}
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
- INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
- INSTALL_WKHTMLTOPDF=${PHP_FPM_INSTALL_WKHTMLTOPDF}
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
- INSTALL_SSH=${PHP_INSTALL_SSH}
- http_proxy
- https_proxy
- no_proxy
dockerfile: "Dockerfile-${PHP_VERSION}"
volumes:
- ${APPLICATION}:${APPLICATION_LOCATION}
- ${PHP_FPM_PATH}${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
expose:
- "9000"
- "9001"
depends_on:
- workspace
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
networks:
- internal
# --------------------------------------------------------------------------
# Redis Server Container
# --------------------------------------------------------------------------
redis:
container_name: crb_dock_redis
build:
context: ./redis
args:
- http_proxy
- https_proxy
- no_proxy
volumes:
- ${DATA_SAVE_PATH}/redis:/data
ports:
- "${REDIS_PORT}:6379"
networks:
- internal
# --------------------------------------------------------------------------
# Nginx Server Container
# --------------------------------------------------------------------------
nginx:
container_name: crb_dock_nginx
build:
context: ./nginx
args:
- http_proxy
- https_proxy
- no_proxy
volumes:
- ${APPLICATION}:${APPLICATION_LOCATION}
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
- "${NGINX_HOST_HTTPS_PORT}:443"
depends_on:
- workspace
networks:
- internal
# --------------------------------------------------------------------------
# MariaDB Container
# --------------------------------------------------------------------------
mariadb:
container_name: crb_dock_mariadb
build:
context: ./mariadb
args:
- http_proxy
- https_proxy
- no_proxy
environment:
- TZ=${WORKSPACE_TIMEZONE}
- MYSQL_DATABASE=${MARIADB_DATABASE}
- MYSQL_USER=${MARIADB_USER}
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
volumes:
- ${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
depends_on:
- workspace
ports:
- "${MARIADB_PORT}:3306"
networks:
- internal
# --------------------------------------------------------------------------
# Portainer
# --------------------------------------------------------------------------
portainer:
container_name: crb_dock_portainer
image: portainer/portainer-ce
command: -H unix:///var/run/docker.sock
ports:
- "${PORTAINER_WEB_PORT}:9000"
- "${PORTAINER_API_PORT}:8000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DATA_SAVE_PATH}/portainer:/data
networks:
- internal
# --------------------------------------------------------------------------
# Networks Setup
# --------------------------------------------------------------------------
networks:
internal:
driver: "bridge"