forked from khs1994-docker/lnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-lnmp.build.yml
104 lines (92 loc) · 2.16 KB
/
docker-lnmp.build.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
version: "3.7"
#
# self build image compose file
#
# $ cd dockerfile/soft
#
# $ cp example.Dockerfile Dockerfile
#
# $ vi Dockerfile
#
# $ cd ../../
#
# $ ./lnmp-docker build [soft]
#
x-build:
&default-build
# Dockerfile: my.Dockerfile
args:
ALPINE_URL: mirrors.ustc.edu.cn # dl-cdn.alpinelinux.org
x-build-debian:
&default-build-debian
# Dockerfile: my.Dockerfile
args:
DEB_URL: mirrors.ustc.edu.cn # deb.debian.org
DEB_SECURITY_URL: mirrors.ustc.edu.cn/debian-security/ # security.debian.org
x-labels:
&default-labels
labels:
- ${LNMP_DOMAIN:-com.khs1994.lnmp}=true
- ${LNMP_DOMAIN:-com.khs1994.lnmp}.app.env=self_build
services:
mysql:
<< : *default-labels
build:
<< : *default-labels
<< : *default-build-debian
context: ./dockerfile/mysql/
redis:
<< : *default-labels
build:
<< : *default-labels
<< : *default-build
# << : *default-build-debian
context: ./dockerfile/redis/
php7:
<< : *default-labels
build:
<< : *default-labels
<< : *default-build
# << : *default-build-debian
context: ./dockerfile/php/
cache_from:
- khs1994/php:fpm-alpine
environment:
- LNMP_DOCKER_VERSION=${LNMP_DOCKER_VERSION:-v19.03} x86_64 With Build Docker Image
nginx:
<< : *default-labels
build:
<< : *default-labels
<< : *default-build
# << : *default-build-debian
context: ./dockerfile/nginx/
phpmyadmin:
<< : *default-labels
build:
<< : *default-labels
<< : *default-build
# << : *default-build-debian
context: ./dockerfile/phpmyadmin/
networks:
frontend:
<< : *default-labels
backend:
<< : *default-labels
volumes:
mysql-data:
<< : *default-labels
redis-data:
<< : *default-labels
zoneinfo-data:
<< : *default-labels
phpmyadmin-data:
<< : *default-labels
composer_cache-data:
<< : *default-labels
secrets:
db_root_password:
<< : *default-labels
file: ./secrets/${LNMP_DB_ROOT_PASSWORD_PATH:-db_root_password.txt}
supervisord_ini:
<< : *default-labels
file: ./config/supervisord/${LNMP_SUPERVISORD_INI_PATH:-supervisord.ini}