-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yaml
95 lines (91 loc) · 2.22 KB
/
docker-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
version: '3'
services:
### PHP-FPM ###
php:
build:
context: ./php
args:
- TIMEZONE=${TZ}
- CHANGE_SOURCE=${CHANGE_SOURCE}
- PHP_VERSION=${PHP_VERSION}
- EXT_SWOOLE_VERSION=${EXT_SWOOLE_VERSION}
- EXT_MONGODB_VERSION=${EXT_MONGODB_VERSION}
- INSTALL_XDEBUG=${INSTALL_XDEBUG}
environment:
TZ: ${TZ}
image: lnmp-php
container_name: compose-php
restart: unless-stopped
volumes:
- ${WORK_DIR}:/data
working_dir: /data
networks:
- lnmp-tier
### NGINX ###
nginx:
build:
context: ./nginx
args:
- TZ=${TZ}
- CHANGE_SOURCE=${CHANGE_SOURCE}
- NGINX_VERSION=${NGINX_VERSION}
environment:
TZ: ${TZ}
image: lnmp-nginx
container_name: compose-nginx
restart: unless-stopped
depends_on:
- php
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/ssl:/etc/nginx/ssl
- ${WORK_DIR}:/data
working_dir: /data
ports:
- 80:80
- 443:443
networks:
- lnmp-tier
# ### MYSQL ###
# mysql:
# build:
# context: ./mysql
# args:
# - MYSQL_VERSION=${MYSQL_VERSION}
# image: lnmp-mysql
# container_name: compose-mysql
# environment:
# MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
# MYSQL_USER: ${MYSQL_USER}
# MYSQL_PASSWORD: ${MYSQL_PASSWORD}
# MYSQL_DATABASE: ${MYSQL_DATABASE}
# volumes:
# - ${DB_MYSQL_PATH}:/var/lib/mysql
# - ./mysql/initdb.d:/docker-entrypoint-initdb.d
# ports:
# - ${MYSQL_PORT}:3306
# networks:
# - lnmp-tier
# ### MONGODB ###
# mongo:
# build:
# context: ./mongo
# args:
# - MONGO_VERSION=${MONGO_VERSION}
# image: lnmp-mongo
# container_name: compose-mongo
# environment:
# - MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USER}
# - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASS}
# - MONGO_INITDB_DATABASE=${MONGO_DATABASE}
# volumes:
# - ${DB_MONGO_PATH}:/data/db
# - ./mongo/initdb.d:/docker-entrypoint-initdb.d
# ports:
# - ${MONGO_PORT}:27017
# networks:
# - lnmp-tier
networks:
lnmp-tier:
driver: bridge