forked from Minds/minds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
121 lines (110 loc) · 2.65 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Using v2.2 because v3+ is meant for swarm operations
version: "2.2"
services:
cassandra:
image: cassandra:3.11.1
environment:
- CASSANDRA_START_RPC=true
networks:
- app
mem_limit: 4048MB
volumes:
- "./cassandra:/var/lib/cassandra:cached"
- "./logs:/var/log"
mongo:
image: mongo:3.4
networks:
- app
elasticsearch:
image: elasticsearch:5.6-alpine
mem_limit: 512MB # keep an eye
ulimits:
memlock:
soft: -1
hard: -1
environment:
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
networks:
- app
redis:
image: redis:4.0-alpine
mem_limit: 100MB # keep an eye
networks:
- app
rabbitmq:
image: rabbitmq:3.6-alpine
networks:
- app
php-fpm:
build:
context: ./engine
dockerfile: ./containers/php-fpm/Dockerfile
mem_limit: 2048MB
depends_on:
- cassandra
#- mongo
#- elasticsearch
#- rabbitmq
- redis
networks:
- app
volumes:
## The following is for development environments only. Comment out on production. ##
- "./front/:/var/www/Minds/front:cached"
- "./plugins/:/var/www/Minds/plugins:cached"
- "./languages/:/var/www/Minds/languages:cached"
## The following is for development environments only. Comment out on production. ##
- "./engine/:/var/www/Minds/engine:cached"
runners:
build:
context: ./engine
dockerfile: ./containers/php-runners/Dockerfile
depends_on:
- cassandra
# - mongo
# - elasticsearch
# - rabbitmq
- redis
networks:
- app
volumes:
- "./front/:/var/www/Minds/front:cached"
- "./plugins/:/var/www/Minds/plugins"
- "./languages/:/var/www/Minds/languages"
- "./engine/:/var/www/Minds/engine"
nginx:
build:
context: ./containers/nginx
dockerfile: ./Dockerfile.dev
mem_limit: 512MB
depends_on:
- php-fpm
ports:
- "8080:80"
networks:
- app
volumes:
## The following is for development environments only. Comment out on production. ##
- "./front/:/var/www/Minds/front:cached"
installer:
build:
context: ./engine
dockerfile: ./containers/installer/Dockerfile
networks:
- app
volumes:
- "./engine/:/var/www/Minds/engine"
- "./front/:/var/www/Minds/front"
front-build:
image: markharding/minds-front-base
networks:
- app
entrypoint:
- sh
- -c
- "cd /var/www/Minds/front && npm install && npm rebuild node-sass && npm run build-dev"
volumes:
- "./front/:/var/www/Minds/front"
networks:
app:
driver: "bridge"