-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-production.yml
75 lines (75 loc) · 1.66 KB
/
docker-compose-production.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
version: '2'
services:
# nginx-proxy:
# image: jwilder/nginx-proxy
# container_name: nginx-proxy
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - /var/run/docker.sock:/tmp/docker.sock:ro
# environment:
# - VIRTUAL_PORT=3000
app:
restart: always
build:
context: .
dockerfile: Dockerfile-production
container_name: podcastdiscovery.app
ports:
- "3000:3000"
links:
- elasticsearch
environment:
- NODE_ENV=production
- DB_1_PORT_27017_TCP_ADDR=db
- ES_URL=podcastdiscovery_elasticsearch_1:9200
- VIRTUAL_HOST=www.podcastdiscovery.net,podcastdiscovery.net
- VIRTUAL_PROTO=http # should be http even if you use https to the proxy, because node.js uses http!
depends_on:
- db
volumes_from:
- app-data
app-data:
build:
context: .
dockerfile: Dockerfile-production
entrypoint: /bin/true
volumes:
- /opt/podcastdiscovery
- /opt/podcastdiscovery/node_modules
- /opt/podcastdiscovery/public
- /opt/podcastdiscovery/uploads
db:
image: mongo:3.2
restart: always
volumes_from:
- db-data
db-data:
image: mongo:3.2
volumes:
- /data/db
- /var/lib/mongodb
- /var/log/mongodb
entrypoint: /bin/true
elasticsearch:
cap_add:
- IPC_LOCK
environment:
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ports:
- "9200:9200"
image: elasticsearch:latest
mem_limit: 1g
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- esdata:/usr/share/elasticsearch/data
volumes:
esdata:
driver: local