forked from khs1994-docker/lnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-lnmp.include.example.yml
66 lines (54 loc) · 1.39 KB
/
docker-lnmp.include.example.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
version: "3.7"
x-common:
&default-common
labels:
- ${LNMP_DOMAIN:-com.khs1994.lnmp}=true
- ${LNMP_DOMAIN:-com.khs1994.lnmp}.app.env=development
services:
# override service
my-service:
image: bash
## https://docs.docker.com/compose/extends/
# php7:
# &php7
# # change php7 default image
# image: username/php
# # open more port
# ports:
# - "9000"
# - "10001:10001"
# # add more volumes
# volumes:
# - type: volume
# source: laravel_vendor
# target: /app/laravel/vendor
# - git-sync-data:/app/git-sync
# nginx:
# volumes:
# - git-sync-data:/app/git-sync
# composer:
# << : *php7
# nginx-unit:
# << : *php7
# mysql:
# # change default volumes settings
# volumes:
# - ./data:/var/lib/mysql
# More Demo
swoole:
<< : *default-common
image: khs1994/php:7.4.3-swoole-alpine
# command 指令只需传入文件名即可
command:
- /app/swoole/index.php
ports:
- 10001:10001
networks:
- backend
volumes:
- ${APP_ROOT:-./app}:${LNMP_PHP_PATH:-/app}:cached
- ./config/php/${LNMP_PHP_INI:-php.development.ini}:/usr/local/etc/php/php.ini:ro,cached
- ./config/php/${LNMP_PHP_EXTRA_INI:-docker-php.ini}:/usr/local/etc/php/conf.d/docker-php.ini:ro,cached
- ./log/php:/var/log/php:delegated
# volumes:
# laravel_vendor: