-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
135 lines (128 loc) · 3.17 KB
/
docker-compose-dev.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
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
133
134
135
version: "3.7"
services:
### PHP-FPM ##############################################
php-fpm:
container_name: lumos-fpm
build:
context: .docker-files/php-fpm
args:
- http_proxy
- https_proxy
- no_proxy
volumes:
- ./.docker-configs/php7.3.ini:/usr/local/etc/php/php.ini
- ./backend:/var/www
- .docker-files/php-fpm/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
expose:
- "9000"
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
depends_on:
- mysql
networks:
- backend
### MySQL ################################################
mysql:
container_name: lumos-mysql
build:
context: ./.docker-files/mysql
environment:
- MYSQL_DATABASE=lumos
- MYSQL_ROOT_PASSWORD=root
- TZ=UTC
volumes:
- ./.sql-dumps/:/docker-entrypoint-initdb.d
ports:
- "${MYSQL_HOST_PORT}:3306"
networks:
- backend
### Lumos NGINX Server #########################################
nginx:
container_name: lumos-nginx
build:
context: ./.docker-files/nginx
args:
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
- http_proxy
- https_proxy
- no_proxy
volumes:
- ./backend:/var/www
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
# - "${NGINX_HOST_HTTPS_PORT}:443"
depends_on:
- php-fpm
networks:
- frontend
- backend
links:
- php-fpm
### phpMyAdmin #########################################
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: lumos-phpmyadmin
environment:
# PMA_ARBITRARY: 1
PMA_HOSTS: mysql
PMA_USER: root
PMA_PASSWORD: root
ports:
- "${PMA_HOST_PORT}:80"
depends_on:
- mysql
networks:
- backend
### React Frontend #########################################
react:
container_name: lumos-react
build:
context: ./.docker-files/react
dockerfile: Dockerfile
volumes:
- './frontend/:/app'
# - '/app/node_modules'
ports:
- '${REACT_HOST_HTTP_PORT}:3000'
environment:
- NODE_ENV=development
- CHOKIDAR_USEPOLLING=true
networks:
- frontend
- backend
depends_on:
- nginx
# ### Redis ################################################
# redis:
# image: redis:5
# container_name: lumos-redis
# ports:
# - "${REDIS_HOST_PORT}:6379"
# networks:
# - backend
# ### REDISWEBUI ################################################
# redis-webui:
# image: erikdubbelboer/phpredisadmin
# container_name: lumos-rediswebui
# environment:
# - ADMIN_USER=admin
# - ADMIN_PASS=admin
# - REDIS_1_HOST=redis
# - REDIS_1_PORT=6379
# networks:
# - backend
# ports:
# - "${REDIS_WEBUI_HOST_PORT}:80"
# depends_on:
# - redis
networks:
frontend:
name: lumos-frontend
driver: ${NETWORKS_DRIVER}
backend:
name: lumos-frontend
driver: ${NETWORKS_DRIVER}