-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (82 loc) · 2.56 KB
/
docker-compose.yml
File metadata and controls
88 lines (82 loc) · 2.56 KB
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
# Taken from https://github.com/CenterForOpenScience/osf.io/pull/6364/files#diff-4e5e90c6228fd48698d074241c2ba760R1
# Install the Docker Client
#
# OSX: https://www.docker.com/products/docker#/mac
# Windows: https://www.docker.com/products/docker#/windows
# Setup the Operation System
#
# OSX
# - Alias the loopback interface
# sudo ifconfig lo0 alias 192.168.168.167
#
# Windows
# - Install Microsoft Loopback Adapter (Windows 10 follow community comments as the driver was renamed)
# https://technet.microsoft.com/en-us/library/cc708322(v=ws.10).aspx
# - Rename the new Loopback Interface (typically called 'Ethernet 2')
# - List interfaces
# netsh interface show interface
# - Rename the interface
# netsh inteface set interface "Ethernet 2" newname="Loopback"
# - Assign the Loopback interface an IP address
# netsh interface ip add address "Loopback" 192.168.168.167 255.255.255.255
# - Allow Docker to access to Drive your project is stored on
# Open the Docker Client -> Settings -> Shared Drives -> e.g. C -> Apply
version: '2'
services:
elasticsearch:
image: elasticsearch:5.4
ports:
- 39200:9200
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
rabbitmq:
image: rabbitmq:management
ports:
- 35672:5672
- 45672:15672
postgres:
image: postgres
command: /bin/bash -c "sed -i -e 's/max_connections.*/max_connections = 5000/' /var/lib/postgresql/data/postgresql.conf || true && sed -i -e 's/#log_min_duration_statement = .*/log_min_duration_statement = 0/' /var/lib/postgresql/data/postgresql.conf || true && /docker-entrypoint.sh postgres"
ports:
- 35432:5432
environment:
POSTGRES_DB: share
worker:
build: .
command: python manage.py celery worker -l DEBUG
depends_on:
- postgres
- rabbitmq
- web
links:
- rabbitmq
- postgres
- web
- elasticsearch
volumes:
- ./:/code
environment:
DATABASE_HOST: postgres
BROKER_URL: amqp://guest:guest@rabbitmq:5672/
SHARE_API_URL: http://web:8000/
ELASTICSEARCH_URL: http://elasticsearch:9200/
web:
build: .
command: python manage.py runserver --noreload 0.0.0.0:8000
ports:
- 38000:8000
depends_on:
- postgres
- rabbitmq
- elasticsearch
links:
- postgres
- rabbitmq
- elasticsearch
volumes:
- ./:/code
environment:
DATABASE_HOST: postgres
BROKER_URL: amqp://guest:guest@rabbitmq:5672/
ELASTICSEARCH_URL: http://elasticsearch:9200/
EMBER_SHARE_URL: http://192.168.168.167:34200