-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
107 lines (102 loc) · 2.55 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
version: '3.1'
services:
mysql:
privileged: true
build: xdocker/mysql
container_name: '${NAME}-mysql'
working_dir: /application
volumes:
- .:/application
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=${NAME}
- MYSQL_USER=${NAME}
- MYSQL_PASSWORD=${NAME}
networks:
- xdnet
restart: on-failure
nginx:
privileged: true
build: xdocker/nginx
container_name: '${NAME}-nginx'
working_dir: /application
volumes:
- .:/application
- ./xdocker/nginx/nginx.conf.template:/etc/nginx/conf.d/nginx.conf.template
ports:
- ${DEFAULT_DOCKER_PORT}
- 443:443
networks:
- xdnet
- proxy
external_links:
- nginx-proxy
environment:
- VIRTUAL_HOST=${HOST}
- NGINX_HOST=${HOST}
- NGINX_PORT=80
- NAME=${NAME}
restart: on-failure
command: /bin/sh -c "envsubst '$${NGINX_HOST},$${NAME}' < /etc/nginx/conf.d/nginx.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
php-fpm:
privileged: true
build: xdocker/php-fpm
container_name: '${NAME}-php-fpm'
working_dir: /application
volumes:
- docker-sync:/application:nocopy
- ~/.ssh:/root/.ssh
- ~/.ssh/config:/etc/ssh/ssh_config
environment:
- SYMFONY_ENV=dev
- VIRTUAL_HOST=${HOST}
- COMPOSER_ALLOW_SUPERUSER=1
networks:
- xdnet
restart: on-failure
# redis:
# privileged: true
# build: xdocker/redis
# container_name: "${NAME}-redis"
# volumes:
# - redis:/data
# ports:
# - "6379:6379"
# networks:
# - xdnet
# elasticsearch:
# privileged: true
# build: ./xdocker/elasticsearch
# container_name: "${NAME}-elasticsearch"
# volumes:
# - esdata:/usr/share/elasticsearch/data
# environment:
# - cluster.name=xdocker-cluster
# - bootstrap.memory_lock=true
# - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
# - "http.host=0.0.0.0"
# - "transport.host=127.0.0.1"
# - "xpack.security.enabled=false"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# ports:
# - "9200:9200"
# - "9300:9300"
# networks:
# - xdnet
volumes:
docker-sync:
external:
name: '${NAME}-sync'
# esdata:
# driver: local
# redis:
# driver: local
networks:
xdnet:
driver: 'bridge'
proxy:
external:
name: proxy_default