-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
132 lines (125 loc) · 3.63 KB
/
compose.yaml
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
services:
php:
build:
context: ./services/php
args:
- PHP_VERSION=${PHP_VERSION}
- PHP_EXTENSIONS=${PHP_EXTENSIONS}
- ALPINE_MIRROR=${ALPINE_MIRROR}
container_name: php
restart: always
volumes:
- ./wwwroot/:/var/www/:rw
- ./logs/php/:/var/log/php/:rw
- ./data/composer/:/tmp/composer/:rw
- ./services/php/php-${PHP_ENVIRONMENT}.ini:/usr/local/etc/php/php.ini:ro
- ./services/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
environment:
- TZ=${TIME_ZONE}
networks:
monolith:
ipv4_address: 172.16.24.11
openresty:
build:
context: ./services/openresty
args:
- OPENRESTY_VERSION=${OPENRESTY_VERSION}
- ALPINE_MIRROR=${ALPINE_MIRROR}
container_name: openresty
restart: always
ports:
- 0.0.0.0:${OPENRESTY_HTTP_PORT}:80
- 0.0.0.0:${OPENRESTY_HTTPS_PORT}:443
volumes:
- ./wwwroot/:/var/www/:rw
- ./logs/openresty/:/var/log/nginx/:rw
- ./services/openresty/ssl/:/etc/nginx/ssl/:ro
- ./services/openresty/conf.d/:/etc/nginx/conf.d/:ro
- ./services/openresty/rewrite/:/etc/nginx/rewrite/:ro
- ./services/openresty/openresty.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro
- ./services/openresty/fastcgi-php.conf:/usr/local/openresty/nginx/conf/fastcgi-php.conf:ro
- ./services/openresty/fastcgi_params:/usr/local/openresty/nginx/conf/fastcgi_params:ro
environment:
- TZ=${TIME_ZONE}
networks:
monolith:
ipv4_address: 172.16.24.21
mariadb:
image: mariadb:${DB_MARIADB_VERSION}
container_name: mariadb
restart: always
volumes:
- ./data/mariadb/:/var/lib/mysql/:rw
- ./services/mariadb/mariadb.cnf:/etc/mysql/conf.d/my.cnf:ro
- ./services/mariadb/scripts/:/docker-entrypoint-initdb.d/:ro
environment:
- TZ=${TIME_ZONE}
- MARIADB_DATABASE=${DB_MARIADB_DATABASE_NAME}
- MARIADB_USER_FILE=/run/secrets/mariadb-user-name
- MARIADB_PASSWORD_FILE=/run/secrets/mariadb-user-pwd
- MARIADB_ROOT_PASSWORD_FILE=/run/secrets/mariadb-root-pwd
secrets:
- mariadb-root-pwd
- mariadb-user-name
- mariadb-user-pwd
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 3
networks:
monolith:
ipv4_address: 172.16.24.31
phpmyadmin:
image: phpmyadmin:${PHPMYADMIN_VERSION}
container_name: phpmyadmin
restart: always
environment:
- TZ=${TIME_ZONE}
- PMA_ARBITRARY=0
- PMA_HOST=mariadb
- PMA_PORT=3306
- UPLOAD_LIMIT=${PHPMYADMIN_UPLOAD_LIMIT}
ports:
- 0.0.0.0:${PHPMYADMIN_WEB_PORT}:80
depends_on:
- mariadb
networks:
monolith:
ipv4_address: 172.16.24.41
memcached:
image: memcached:${MEMCACHED_VERSION}
container_name: memcached
restart: always
networks:
monolith:
ipv4_address: 172.16.24.42
redis:
build:
context: ./services/redis
args:
- REDIS_VERSION=${REDIS_VERSION}
container_name: redis
restart: always
volumes:
- ./data/redis/:/data/:rw
- ./services/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro
environment:
- TZ=${TIME_ZONE}
networks:
monolith:
ipv4_address: 172.16.24.43
networks:
monolith:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.24.0/24
secrets:
mariadb-root-pwd:
file: ./secrets/mariadb-root-pwd
mariadb-user-name:
file: ./secrets/mariadb-user-name
mariadb-user-pwd:
file: ./secrets/mariadb-user-pwd